From: Niki Date: Tue, 25 Jun 2024 14:56:41 +0000 (+0200) Subject: cstring: fix readline for empty lines X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=0dbfba1b2c91562142588c6ebf0538233eccd1ef;p=cutils.git cstring: fix readline for empty lines --- diff --git a/cstring.c b/cstring.c index 5a4d81a..f27580f 100644 --- a/cstring.c +++ b/cstring.c @@ -648,7 +648,7 @@ int cstring_readline(cstring_t *self, FILE *file) { } cstring_clear(self); - return 0; + return !feof(file); } static void normalize_path(cstring_t *self) {