]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix compilation of multi-result call to next().
authorMike Pall <mike>
Wed, 6 Oct 2021 15:31:46 +0000 (17:31 +0200)
committerMike Pall <mike>
Wed, 6 Oct 2021 15:31:46 +0000 (17:31 +0200)
Thanks to Vyacheslav Egorov.

src/lj_ffrecord.c

index 01e53fb67029bd099466572813cdde326d874418..4c351bd6c191c8be6b72de21d2fc11134b65cc00 100644 (file)
@@ -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;