From ff09a2d724e00af8964b0b80c0977304f3f10a93 Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:04:23 +1000 Subject: [PATCH] fixed custom object fields --- src/pc/lua/smlua_cobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pc/lua/smlua_cobject.c b/src/pc/lua/smlua_cobject.c index d1cdbfa9e..38f61f308 100644 --- a/src/pc/lua/smlua_cobject.c +++ b/src/pc/lua/smlua_cobject.c @@ -315,6 +315,7 @@ struct LuaObjectField* smlua_get_custom_field(lua_State* L, u32 lot, int keyInde lof.lot = LOT_NONE; lof.valueOffset = offsetof(struct Object, rawData.asU32[fieldIndex]); lof.valueType = lvt; + lof.count = 1; lua_pop(L, 1); // pop value table lua_pop(L, 1); // pop _custom_fields