fix: add additional checking

This commit is contained in:
2026-01-10 02:33:18 -03:00
parent 9264c819ee
commit 392dd8a68e
+2
View File
@@ -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