diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/readline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/readline.c b/common/readline.c index cc40a2cc..d35ba73e 100644 --- a/common/readline.c +++ b/common/readline.c | |||
@@ -36,7 +36,7 @@ char *read_line(FILE *file) { | |||
36 | } | 36 | } |
37 | string[length++] = c; | 37 | string[length++] = c; |
38 | } | 38 | } |
39 | if (length + 1 == size) { | 39 | if (length + 1 >= size) { |
40 | char *new_string = realloc(string, length + 1); | 40 | char *new_string = realloc(string, length + 1); |
41 | if (!new_string) { | 41 | if (!new_string) { |
42 | free(string); | 42 | free(string); |