summaryrefslogtreecommitdiff
path: root/src/lparser.c
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2011-07-04 12:00:00 +0000
committerrepogen <>2011-07-04 12:00:00 +0000
commitcc3a4be74122bb2c002798696730bca68d36fcc9 (patch)
tree819baa9883530ae9e805464c7d5771b5cbb9a663 /src/lparser.c
parentf6800181d1ead861262d8465110d80116e98ad6e (diff)
downloadlua-github-5.2.0-beta-rc5.tar.gz
Lua 5.2.0-beta-rc55.2.0-beta-rc5
Diffstat (limited to 'src/lparser.c')
-rw-r--r--src/lparser.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lparser.c b/src/lparser.c
index 6ffecc43..d9c41739 100644
--- a/src/lparser.c
+++ b/src/lparser.c
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 2.112 2011/06/27 18:18:59 roberto Exp $
+** $Id: lparser.c,v 2.113 2011/07/02 15:58:14 roberto Exp $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -1398,13 +1398,11 @@ static void ifstat (LexState *ls, int line) {
static void localfunc (LexState *ls) {
expdesc b;
FuncState *fs = ls->fs;
- int varidx = fs->nactvar; /* index of new local variable */
new_localvar(ls, str_checkname(ls)); /* new local variable */
adjustlocalvars(ls, 1); /* enter its scope */
body(ls, &b, 0, ls->linenumber); /* function created in next register */
- lua_assert(b.k == VNONRELOC && b.u.ind.idx == varidx);
/* debug information will only see the variable after this point! */
- getlocvar(fs, varidx)->startpc = fs->pc;
+ getlocvar(fs, b.u.info)->startpc = fs->pc;
}