diff --git a/3rd/lua/lparser.c b/3rd/lua/lparser.c index 60be8aa2..7845ccf1 100644 --- a/3rd/lua/lparser.c +++ b/3rd/lua/lparser.c @@ -1229,7 +1229,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 */ diff --git a/3rd/lua/lstrlib.c b/3rd/lua/lstrlib.c index fe30e34b..bc6fc4ea 100644 --- a/3rd/lua/lstrlib.c +++ b/3rd/lua/lstrlib.c @@ -688,6 +688,7 @@ typedef struct GMatchState { static int gmatch_aux (lua_State *L) { GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3)); const char *src; + gm->ms.L = L; for (src = gm->src; src <= gm->ms.src_end; src++) { const char *e; reprepstate(&gm->ms);