diff options
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -904,12 +904,11 @@ static void recfield (LexState *ls, ConsControl *cc) { | |||
904 | FuncState *fs = ls->fs; | 904 | FuncState *fs = ls->fs; |
905 | lu_byte reg = ls->fs->freereg; | 905 | lu_byte reg = ls->fs->freereg; |
906 | expdesc tab, key, val; | 906 | expdesc tab, key, val; |
907 | if (ls->t.token == TK_NAME) { | 907 | if (ls->t.token == TK_NAME) |
908 | luaY_checklimit(fs, cc->nh, INT_MAX / 2, "items in a constructor"); | ||
909 | codename(ls, &key); | 908 | codename(ls, &key); |
910 | } | ||
911 | else /* ls->t.token == '[' */ | 909 | else /* ls->t.token == '[' */ |
912 | yindex(ls, &key); | 910 | yindex(ls, &key); |
911 | luaY_checklimit(fs, cc->nh, INT_MAX / 2, "items in a constructor"); | ||
913 | cc->nh++; | 912 | cc->nh++; |
914 | checknext(ls, '='); | 913 | checknext(ls, '='); |
915 | tab = *cc->t; | 914 | tab = *cc->t; |