From 06b8c2a046f44437c4d4b49999fbc1f664ab31b7 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 30 May 2025 13:28:47 +0200 Subject: [PATCH] repair line wrap bug A new line is wrongfully added to empty input when using the line wrap option. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index bc612d5..54098a2 100644 --- a/main.c +++ b/main.c @@ -58,7 +58,7 @@ main(int argc, char *argv[]) fwrite(obuf, sizeof(*obuf), n, (out) ? out : stdout); } } else if (wrp) { - last = 0; + last = '\n'; while ((n = fread(obuf, sizeof(*obuf), OCTETBUF, (in) ? in : stdin))) { n = encode(obuf, n, sbuf, url); last = printw((out) ? out : stdout, sbuf, n);