From: Eric Andersen Date: Thu, 18 Oct 2001 03:20:41 +0000 (-0000) Subject: Patch from Stefan Soucek to X-Git-Tag: 0_60_2~125 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1bf25f030777a83ed498914ad65ba3d44b8b3fdc;p=oweals%2Fbusybox.git Patch from Stefan Soucek to ignore extra empty lines in fgets_str --- diff --git a/libbb/fgets_str.c b/libbb/fgets_str.c index 33d8d00cc..7d41d72f1 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';