Skip to content

Commit 242ff32

Browse files
committed
lua 5.3.2 bugfix 2/3
1 parent ba451c1 commit 242ff32

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

3rd/lua/lparser.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ static void labelstat (LexState *ls, TString *label, int line) {
12291229
checkrepeated(fs, ll, label); /* check for repeated labels */
12301230
checknext(ls, TK_DBCOLON); /* skip double colon */
12311231
/* create new entry for this label */
1232-
l = newlabelentry(ls, ll, label, line, fs->pc);
1232+
l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs));
12331233
skipnoopstat(ls); /* skip other no-op statements */
12341234
if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */
12351235
/* assume that locals are already out of scope */

3rd/lua/lstrlib.c

+1
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ typedef struct GMatchState {
688688
static int gmatch_aux (lua_State *L) {
689689
GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3));
690690
const char *src;
691+
gm->ms.L = L;
691692
for (src = gm->src; src <= gm->ms.src_end; src++) {
692693
const char *e;
693694
reprepstate(&gm->ms);

0 commit comments

Comments
 (0)