diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/fgets_str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/fgets_str.c b/libbb/fgets_str.c index 33d8d00..7d41d72 100644 --- a/libbb/fgets_str.c +++ b/libbb/fgets_str.c @@ -55,7 +55,7 @@ char *fgets_str(FILE *file, const char *terminating_string) break; } } - if (idx == 0) { + if (idx == 0 || linebuf[0] == '\n') { return NULL; } linebuf[idx] = '\0'; |