mirror of
https://github.com/sheumann/hush.git
synced 2025-01-15 18:30:43 +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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (idx == 0) {
|
if (idx == 0 || linebuf[0] == '\n') {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
linebuf[idx] = '\0';
|
linebuf[idx] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user