aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-03-07 16:25:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-03-07 16:25:39 -0300
commite7b2e01d43d9c3ab6d223daa18eebb94a322e082 (patch)
tree0f6ba55c0b90037e47ef6ee061c1ec51e526d99a /lparser.c
parent03ca6385dc426fefabe9204037fc76ebf0627a11 (diff)
downloadlua-e7b2e01d43d9c3ab6d223daa18eebb94a322e082.tar.gz
lua-e7b2e01d43d9c3ab6d223daa18eebb94a322e082.tar.bz2
lua-e7b2e01d43d9c3ab6d223daa18eebb94a322e082.zip
bug: label between local definitions can mix-up their initializations
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lparser.c b/lparser.c
index 757d6546..0b5d75a8 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.150 2015/12/09 15:21:28 roberto Exp roberto $ 2** $Id: lparser.c,v 2.151 2016/01/05 16:22:37 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*/
@@ -1230,7 +1230,7 @@ static void labelstat (LexState *ls, TString *label, int line) {
1230 checkrepeated(fs, ll, label); /* check for repeated labels */ 1230 checkrepeated(fs, ll, label); /* check for repeated labels */
1231 checknext(ls, TK_DBCOLON); /* skip double colon */ 1231 checknext(ls, TK_DBCOLON); /* skip double colon */
1232 /* create new entry for this label */ 1232 /* create new entry for this label */
1233 l = newlabelentry(ls, ll, label, line, fs->pc); 1233 l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs));
1234 skipnoopstat(ls); /* skip other no-op statements */ 1234 skipnoopstat(ls); /* skip other no-op statements */
1235 if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ 1235 if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */
1236 /* assume that locals are already out of scope */ 1236 /* assume that locals are already out of scope */