mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Treat NUL as the end-of-line.
This commit is contained in:
parent
66c22051f9
commit
355a61b56f
@ -45,7 +45,7 @@ extern char *get_line_from_file(FILE *file)
|
||||
while (idx > linebufsz-2)
|
||||
linebuf = xrealloc(linebuf, linebufsz += GROWBY);
|
||||
linebuf[idx++] = (char)ch;
|
||||
if ((char)ch == '\n')
|
||||
if (ch == '\n' || ch == '\0')
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user