repair line wrap bug
A new line is wrongfully added to empty input when using the line wrap option.
This commit is contained in:
parent
aacf2324c7
commit
06b8c2a046
1 changed files with 1 additions and 1 deletions
2
main.c
2
main.c
|
@ -58,7 +58,7 @@ main(int argc, char *argv[])
|
||||||
fwrite(obuf, sizeof(*obuf), n, (out) ? out : stdout);
|
fwrite(obuf, sizeof(*obuf), n, (out) ? out : stdout);
|
||||||
}
|
}
|
||||||
} else if (wrp) {
|
} else if (wrp) {
|
||||||
last = 0;
|
last = '\n';
|
||||||
while ((n = fread(obuf, sizeof(*obuf), OCTETBUF, (in) ? in : stdin))) {
|
while ((n = fread(obuf, sizeof(*obuf), OCTETBUF, (in) ? in : stdin))) {
|
||||||
n = encode(obuf, n, sbuf, url);
|
n = encode(obuf, n, sbuf, url);
|
||||||
last = printw((out) ? out : stdout, sbuf, n);
|
last = printw((out) ? out : stdout, sbuf, n);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue