From 811e60f7cf3b2edb2b19cff9c1459d81e4be5067 Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Fri, 14 Feb 2025 22:50:57 +1000 Subject: [PATCH] fixed custom model alloc again --- src/pc/lua/utils/smlua_model_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pc/lua/utils/smlua_model_utils.c b/src/pc/lua/utils/smlua_model_utils.c index dbc4dcbd4..c94375d70 100644 --- a/src/pc/lua/utils/smlua_model_utils.c +++ b/src/pc/lua/utils/smlua_model_utils.c @@ -528,7 +528,7 @@ enum ModelExtendedId smlua_model_util_get_id(const char* name) { // If we've extended past our current custom model limit. Reallocate so we have more space. if (sCustomModelsCount >= sMaxCustomModelsCount) { - if (sMaxCustomModelsCount + CUSTOM_MODEL_CHUNK_SIZE < 0xFFFF) { + if (sMaxCustomModelsCount + CUSTOM_MODEL_CHUNK_SIZE >= 0xFFFF) { LOG_LUA("Failed to get model: '%s' (too many custom models!)", name); return E_MODEL_ERROR_MODEL; }