From c3f4231dc117efb0a123de7e0659df7bdca1c5ea Mon Sep 17 00:00:00 2001 From: actboy168 Date: Mon, 26 Aug 2024 15:46:30 +0800 Subject: [PATCH] see https://lua.org/bugs.html#5.4.7-2 --- 3rd/lua/lcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rd/lua/lcode.c b/3rd/lua/lcode.c index 87616140..7c24b1b4 100644 --- a/3rd/lua/lcode.c +++ b/3rd/lua/lcode.c @@ -985,7 +985,7 @@ void luaK_exp2anyregup (FuncState *fs, expdesc *e) { ** or it is a constant. */ void luaK_exp2val (FuncState *fs, expdesc *e) { - if (hasjumps(e)) + if (e->k == VJMP || hasjumps(e)) luaK_exp2anyreg(fs, e); else luaK_dischargevars(fs, e);