table.foreach deprecated in lua 5.1
This commit is contained in:
@@ -75,7 +75,10 @@ function DeepCopy(t, already_copied)
|
||||
already_copied[t] = { }
|
||||
local ret = already_copied[t]
|
||||
|
||||
table.foreach(t, function(a,b) ret[a] = DeepCopy(b, already_copied) end)
|
||||
for a, b in pairs(t) do
|
||||
ret[a] = DeepCopy( b, already_copied )
|
||||
end
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user