|
@@ -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
|
|
** Lua Parser
|
|
** See Copyright Notice in lua.h
|
|
** 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 */
|
|
checkrepeated(fs, ll, label); /* check for repeated labels */
|
|
checknext(ls, TK_DBCOLON); /* skip double colon */
|
|
checknext(ls, TK_DBCOLON); /* skip double colon */
|
|
/* create new entry for this label */
|
|
/* 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 */
|
|
skipnoopstat(ls); /* skip other no-op statements */
|
|
if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */
|
|
if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */
|
|
/* assume that locals are already out of scope */
|
|
/* assume that locals are already out of scope */
|