mirror of
https://github.com/sheumann/hush.git
synced 2024-12-28 07:30:23 +00: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