From e7b2e01d43d9c3ab6d223daa18eebb94a322e082 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 7 Mar 2016 16:25:39 -0300 Subject: bug: label between local definitions can mix-up their initializations --- lparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 757d6546..0b5d75a8 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.150 2015/12/09 15:21:28 roberto Exp roberto $ +** $Id: lparser.c,v 2.151 2016/01/05 16:22:37 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -1230,7 +1230,7 @@ static void labelstat (LexState *ls, TString *label, int line) { checkrepeated(fs, ll, label); /* check for repeated labels */ checknext(ls, TK_DBCOLON); /* skip double colon */ /* create new entry for this label */ - l = newlabelentry(ls, ll, label, line, fs->pc); + l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs)); skipnoopstat(ls); /* skip other no-op statements */ if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ /* assume that locals are already out of scope */ -- cgit v1.2.3-55-g6feb