Copy metatable in table.deepcopy
Copy metatable as well during deep copying
This commit is contained in:
@@ -74,7 +74,7 @@ function table.deep_copy(t)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return copied
|
return setmetatable(copied, getmetatable(t))
|
||||||
end
|
end
|
||||||
|
|
||||||
function table.count_pairs(t)
|
function table.count_pairs(t)
|
||||||
|
|||||||
Reference in New Issue
Block a user