mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 18:30:27 -04:00
Fixed setmetatable(t, nil), closes #464.
This commit is contained in:
parent
f685f81cc7
commit
18213bde2a
@ -78,6 +78,9 @@ sandbox = {
|
|||||||
rawset = rawset,
|
rawset = rawset,
|
||||||
select = select,
|
select = select,
|
||||||
setmetatable = function(t, mt)
|
setmetatable = function(t, mt)
|
||||||
|
if type(mt) ~= "table" then
|
||||||
|
return setmetatable(t, mt)
|
||||||
|
end
|
||||||
local gc = rawget(mt, "__gc")
|
local gc = rawget(mt, "__gc")
|
||||||
if type(gc) == "function" then
|
if type(gc) == "function" then
|
||||||
-- For all user __gc functions we enforce a much tighter deadline.
|
-- For all user __gc functions we enforce a much tighter deadline.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user