diff options
author | Eric Andersen | 2001-10-18 03:20:41 +0000 |
---|---|---|
committer | Eric Andersen | 2001-10-18 03:20:41 +0000 |
commit | 1bf25f030777a83ed498914ad65ba3d44b8b3fdc (patch) | |
tree | a1b1a780ea8136c06301d3917aad565d035aba85 /libbb | |
parent | 4bef7b41861f02874bce4ac6ab0c8c2484d41d07 (diff) | |
download | busybox-1bf25f030777a83ed498914ad65ba3d44b8b3fdc.zip busybox-1bf25f030777a83ed498914ad65ba3d44b8b3fdc.tar.gz |
Patch from Stefan Soucek <ssoucek@coactive.com> to
ignore extra empty lines in fgets_str
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'; |