1
0
mirror of https://github.com/sheumann/hush.git synced 2025-01-18 23:29:48 +00:00

Treat NUL as the end-of-line.

This commit is contained in:
Matt Kraai 2001-11-20 15:49:50 +00:00
parent 66c22051f9
commit 355a61b56f

@ -45,7 +45,7 @@ extern char *get_line_from_file(FILE *file)
while (idx > linebufsz-2) while (idx > linebufsz-2)
linebuf = xrealloc(linebuf, linebufsz += GROWBY); linebuf = xrealloc(linebuf, linebufsz += GROWBY);
linebuf[idx++] = (char)ch; linebuf[idx++] = (char)ch;
if ((char)ch == '\n') if (ch == '\n' || ch == '\0')
break; break;
} }