summaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lparser.c b/lparser.c
index 8468ab0e..648a7437 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.52 2007/03/27 14:11:38 roberto Exp roberto $ 2** $Id: lparser.c,v 2.53 2007/05/11 17:28:56 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -73,8 +73,8 @@ static void errorlimit (FuncState *fs, int limit, const char *what) {
73 const char *where = (fs->f->linedefined == 0) ? 73 const char *where = (fs->f->linedefined == 0) ?
74 "main function" : 74 "main function" :
75 luaO_pushfstring(fs->L, "function at line %d", fs->f->linedefined); 75 luaO_pushfstring(fs->L, "function at line %d", fs->f->linedefined);
76 msg = luaO_pushfstring(fs->L, "too many %s in %s (limit is %d)", 76 msg = luaO_pushfstring(fs->L, "too many %s (limit is %d) in %s",
77 what, where, limit); 77 what, limit, where);
78 luaX_lexerror(fs->ls, msg, fs->ls->t.token); 78 luaX_lexerror(fs->ls, msg, fs->ls->t.token);
79} 79}
80 80
@@ -946,6 +946,8 @@ static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {
946 primaryexp(ls, &nv.v); 946 primaryexp(ls, &nv.v);
947 if (nv.v.k == VLOCAL) 947 if (nv.v.k == VLOCAL)
948 check_conflict(ls, lh, &nv.v); 948 check_conflict(ls, lh, &nv.v);
949 luaY_checklimit(ls->fs, nvars, LUAI_MAXCCALLS - G(ls->L)->nCcalls,
950 "variable names");
949 assignment(ls, &nv, nvars+1); 951 assignment(ls, &nv, nvars+1);
950 } 952 }
951 else { /* assignment -> `=' explist1 */ 953 else { /* assignment -> `=' explist1 */