diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-10-18 03:20:41 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-10-18 03:20:41 +0000 |
commit | c4de7b7fbd6fe1d1b083920a58a0e4f8609ab624 (patch) | |
tree | a1b1a780ea8136c06301d3917aad565d035aba85 /libbb | |
parent | e35431e9356980bd9ff763b5cb13905ef0580818 (diff) | |
download | busybox-w32-c4de7b7fbd6fe1d1b083920a58a0e4f8609ab624.tar.gz busybox-w32-c4de7b7fbd6fe1d1b083920a58a0e4f8609ab624.tar.bz2 busybox-w32-c4de7b7fbd6fe1d1b083920a58a0e4f8609ab624.zip |
Patch from Stefan Soucek <ssoucek@coactive.com> to
ignore extra empty lines in fgets_str
git-svn-id: svn://busybox.net/trunk/busybox@3536 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 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) | |||
55 | break; | 55 | break; |
56 | } | 56 | } |
57 | } | 57 | } |
58 | if (idx == 0) { | 58 | if (idx == 0 || linebuf[0] == '\n') { |
59 | return NULL; | 59 | return NULL; |
60 | } | 60 | } |
61 | linebuf[idx] = '\0'; | 61 | linebuf[idx] = '\0'; |