Patch from Stefan Soucek <ssoucek@coactive.com> to

ignore extra empty lines in fgets_str
This commit is contained in:
Eric Andersen 2001-10-18 03:20:41 +00:00
parent 4bef7b4186
commit 1bf25f0307

View File

@ -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';