diff options
Diffstat (limited to 'strbuf.c')
-rw-r--r-- | strbuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -37,6 +37,8 @@ void read_line(struct strbuf *sb, FILE *fp, int term) { break; strbuf_add(sb, ch); } + if (ch == EOF && sb->len == 0) + sb->eof = 1; strbuf_end(sb); } |