From fa50380be027b66f702efb4bc5a37b1d2c35f4f2 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 24 Aug 2026 09:46:47 -0400 Subject: [PATCH] fix a unit test failing on OpenBSD/aarch64 (#3251) `ci - 1` is the suspended Lua frame, `ci` is the C luaB_yield frame. Fixes one of the three failing tests from #3179. --- rts/System/creg/SerializeLuaState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/System/creg/SerializeLuaState.cpp b/rts/System/creg/SerializeLuaState.cpp index f8a767be377..65b7d7c3e98 100644 --- a/rts/System/creg/SerializeLuaState.cpp +++ b/rts/System/creg/SerializeLuaState.cpp @@ -1042,7 +1042,7 @@ void creg_lua_State::PostLoad() } size_t savedpc_offset = * (size_t *) &savedpc; - savedpc = GetProtoFromCallInfo(ci)->code + savedpc_offset; + savedpc = GetProtoFromCallInfo(ci - 1)->code + savedpc_offset; }