From 392dd8a68e93cee524ad13d8fdaf8eb10479f71e Mon Sep 17 00:00:00 2001 From: neru Date: Sat, 10 Jan 2026 02:33:18 -0300 Subject: [PATCH] fix: add additional checking --- lua/Cheat Engine/Supermarket.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/Cheat Engine/Supermarket.lua b/lua/Cheat Engine/Supermarket.lua index c6c1e04..d18fd51 100644 --- a/lua/Cheat Engine/Supermarket.lua +++ b/lua/Cheat Engine/Supermarket.lua @@ -62,6 +62,8 @@ end mono class wrappers ]] function MonoArray(addr) + if not addr or addr == 0 then error("attempted to instantiate MonoArray with invalid addr") end + local classId, className = mono_object_getClass(addr) if not className then error("address did not point to valid object") end if className:sub(-2) ~= "[]" then error("address did not point to array") end