Showing the changes to src/lparser.c (1 of 2 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | −** $Id: lparser.c,v 1.37 1999/06/17 17:04:03 roberto Exp $ | |
| 2 | +** $Id: lparser.c,v 1.37a 1999/06/17 17:04:03 roberto Exp $ | |
| 3 | 3 | ** LL(1) Parser and code generator for Lua |
| 4 | 4 | ** See Copyright Notice in lua.h |
| 5 | 5 | */ |
| @@ -665,7 +665,8 @@ static int checkname (LexState *ls) { · 659 unmodified lines | ||
| 665 | 665 | |
| 666 | 666 | |
| 667 | 667 | static TaggedString *str_checkname (LexState *ls) { |
| 668 | − return tsvalue(&ls->fs->f->consts[checkname(ls)]); | |
| 668 | + int i = checkname(ls); /* this call may realloc `f->consts' */ | |
| 669 | + return tsvalue(&ls->fs->f->consts[i]); | |
| 669 | 670 | } |
| 670 | 671 | |
| 671 | 672 | |