diff options
-rw-r--r-- | utility.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1616,7 +1616,7 @@ extern char *get_line_from_file(FILE *file) | |||
1616 | if (ch == EOF) | 1616 | if (ch == EOF) |
1617 | break; | 1617 | break; |
1618 | /* grow the line buffer as necessary */ | 1618 | /* grow the line buffer as necessary */ |
1619 | if (idx > linebufsz-1) | 1619 | if (idx > linebufsz-2) |
1620 | linebuf = realloc(linebuf, linebufsz += GROWBY); | 1620 | linebuf = realloc(linebuf, linebufsz += GROWBY); |
1621 | linebuf[idx++] = (char)ch; | 1621 | linebuf[idx++] = (char)ch; |
1622 | if ((char)ch == '\n') | 1622 | if ((char)ch == '\n') |