libidav/utils.c

changeset 696
ec1509240080
parent 673
8e7e56cfc103
child 723
5ca174b3247a
--- 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);
     }
     

mercurial