Fix realloc() bug in gr65

The pointer to the input buffer was not being updated after a call to
realloc(), causing the program to crash if realloc() moved the buffer.
This commit is contained in:
Richard Halkyard 2019-05-21 16:06:47 -05:00 committed by Oliver Schmidt
parent 644d623d31
commit 448aa35f50
1 changed files with 1 additions and 1 deletions

View File

@ -861,7 +861,7 @@ static char *filterInput (FILE *F, char *tbl)
}
if (a == EOF) {
tbl[i] = '\0';
xrealloc (tbl, i + 1);
tbl = xrealloc (tbl, i + 1);
break;
}
if (IsSpace (a)) {