Fixed broken setmetatable with __gc.

This commit is contained in:
Florian Nücke 2016-02-07 12:04:00 +01:00
parent d4addfd8e4
commit ce081cfc73

View File

@ -737,7 +737,7 @@ sandbox = {
local ret = table.pack(pcall(setmetatable, t, mt))
rawset(mt, "__gc", gc) -- restore __gc
if not ret[1] then error(ret[2], 0) end
return table.unpack(ret, 1, ret.n)
return table.unpack(ret, 2, ret.n)
end
end
return setmetatable(t, mt)