fix: add additional checking
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user