mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Copy metatable in table.deepcopy
Copy metatable as well during deep copying
This commit is contained in:
parent
babb6a6d8d
commit
61741a5cc8
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ function table.deep_copy(t)
|
|||
end
|
||||
end
|
||||
|
||||
return copied
|
||||
return setmetatable(copied, getmetatable(t))
|
||||
end
|
||||
|
||||
function table.count_pairs(t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue