From e371ff272b73026c7e026206d31347116df0e7e7 Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 21 Mar 2022 22:43:58 -0700 Subject: [PATCH] Revert "Fix smlua_field_valid for Lua" This reverts commit 5b69173d0a8318acec9216cfc86fe9fe0879e762. --- src/pc/lua/smlua_cobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pc/lua/smlua_cobject.c b/src/pc/lua/smlua_cobject.c index 2cd16adc..c3e87ae2 100644 --- a/src/pc/lua/smlua_cobject.c +++ b/src/pc/lua/smlua_cobject.c @@ -337,8 +337,8 @@ static bool smlua_field_valid(struct LuaObjectField* data, enum LuaObjectType lo size_t length = maximum - minimum; size_t maxlength = sizeof(void*) + sizeof(u32); - if (length < maxlength) { - return (data->lot == lot) && (data->valueOffset == offset) && (lot != LOT_NONE); + if (length >= maxlength) { + return (data->lot == lot) && (lot != LOT_NONE); } return (length >= maxlength);