Sat, 14 Dec 2019 09:31:59 +0100
fix util_readline
libidav/utils.c | file | annotate | diff | comparison | revisions |
--- a/libidav/utils.c Thu Dec 12 20:58:30 2019 +0100 +++ b/libidav/utils.c Sat Dec 14 09:31:59 2019 +0100 @@ -974,7 +974,10 @@ UcxBuffer *buf = ucx_buffer_new(NULL, 128, UCX_BUFFER_AUTOEXTEND); int c; - while((c = fgetc(stream)) != '\n') { + while((c = fgetc(stream)) != EOF) { + if(c == '\n') { + break; + } ucx_buffer_putc(buf, c); }