aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lparser.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lparser.c b/lparser.c
index e233cf8f..03f87176 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.111 2011/06/20 16:52:48 roberto Exp roberto $ 2** $Id: lparser.c,v 2.112 2011/06/27 18:18:59 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*/
@@ -1398,13 +1398,11 @@ static void ifstat (LexState *ls, int line) {
1398static void localfunc (LexState *ls) { 1398static void localfunc (LexState *ls) {
1399 expdesc b; 1399 expdesc b;
1400 FuncState *fs = ls->fs; 1400 FuncState *fs = ls->fs;
1401 int varidx = fs->nactvar; /* index of new local variable */
1402 new_localvar(ls, str_checkname(ls)); /* new local variable */ 1401 new_localvar(ls, str_checkname(ls)); /* new local variable */
1403 adjustlocalvars(ls, 1); /* enter its scope */ 1402 adjustlocalvars(ls, 1); /* enter its scope */
1404 body(ls, &b, 0, ls->linenumber); /* function created in next register */ 1403 body(ls, &b, 0, ls->linenumber); /* function created in next register */
1405 lua_assert(b.k == VNONRELOC && b.u.ind.idx == varidx);
1406 /* debug information will only see the variable after this point! */ 1404 /* debug information will only see the variable after this point! */
1407 getlocvar(fs, varidx)->startpc = fs->pc; 1405 getlocvar(fs, b.u.info)->startpc = fs->pc;
1408} 1406}
1409 1407
1410 1408