Skip to content

Commit

Permalink
Fixed broken setmetatable with __gc.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke committed Feb 7, 2016
1 parent d4addfd commit ce081cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/assets/opencomputers/lua/machine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ce081cf

Please sign in to comment.