mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 10:21:45 -04:00
Fix potentially unexpected behavior when using custom __pairs for metatables. Closes #1625.
This commit is contained in:
parent
0ba31b7be0
commit
45d8a20118
@ -720,7 +720,7 @@ sandbox = {
|
||||
-- which can lead to noticeable lag if the __gc function behaves badly.
|
||||
local sbmt = {} -- sandboxed metatable. only for __gc stuff, so it's
|
||||
-- kinda ok to have a shallow copy instead... meh.
|
||||
for k, v in pairs(mt) do
|
||||
for k, v in next, mt do
|
||||
sbmt[k] = v
|
||||
end
|
||||
sbmt.mt = mt
|
||||
|
Loading…
x
Reference in New Issue
Block a user