mirror of
https://git.busybox.net/busybox.git
synced 2024-12-19 02:13:22 +08:00
Patch from Stefan Soucek <ssoucek@coactive.com> to
ignore extra empty lines in fgets_str
This commit is contained in:
parent
4bef7b4186
commit
1bf25f0307
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user