mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
fix table.copy
This commit is contained in:
parent
92fb19ba5e
commit
a2bf2bc1a1
1 changed files with 5 additions and 1 deletions
|
|
@ -57,7 +57,11 @@ function table.copy(t)
|
||||||
local copied = {}
|
local copied = {}
|
||||||
|
|
||||||
for k, v in pairs(t) do
|
for k, v in pairs(t) do
|
||||||
copied[k] = v
|
if type(v) == "table" then
|
||||||
|
copied[k] = table.copy(v)
|
||||||
|
else
|
||||||
|
copied[k] = v
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return copied
|
return copied
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue