From 442eff63abca3a8a79b80a6f7d27377720d5d126 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 6 Oct 2021 17:31:46 +0200 Subject: [PATCH] Fix compilation of multi-result call to next(). Thanks to Vyacheslav Egorov. --- src/lj_ffrecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index 01e53fb6..4c351bd6 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c @@ -546,7 +546,7 @@ static void LJ_FASTCALL recff_next(jit_State *J, RecordFFData *rd) ix.keyv.u32.lo = lj_tab_keyindex(tabV(&ix.tabv), keyv); /* Omit the value, if not used by the caller. */ ix.idxchain = (J->framedepth && frame_islua(J->L->base-1) && - bc_b(frame_pc(J->L->base-1)[-1]) <= 2); + bc_b(frame_pc(J->L->base-1)[-1])-1 < 2); ix.mobj = 0; /* We don't need the next index. */ rd->nres = lj_record_next(J, &ix); J->base[0] = ix.key;