Fix unpack() recording.

Thanks to Christian Clason and Justin M. Keyes. #1513
This commit is contained in:
Mike Pall 2026-08-19 20:56:02 +02:00
parent 21ecb3610e
commit 8c23d6aad7

View File

@ -336,7 +336,7 @@ static void LJ_FASTCALL recff_unpack(jit_State *J, RecordFFData *rd)
} }
/* Ending index. */ /* Ending index. */
trend = J->base[2]; trend = J->base[2];
if (tref_isnil(trend)) { /* Default end = #t. */ if (J->maxslot < 3 || tref_isnil(trend)) { /* Default end = #t. */
end = (int32_t)lj_tab_len(t); end = (int32_t)lj_tab_len(t);
trend = emitir(IRTI(IR_ALEN), trtab, TREF_NIL); trend = emitir(IRTI(IR_ALEN), trtab, TREF_NIL);
} else { } else {