Copy metatable in table.deepcopy

Copy metatable as well during deep copying
This commit is contained in:
Richard Try 2024-12-19 01:37:34 +03:00 committed by GitHub
parent babb6a6d8d
commit 61741a5cc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@ function table.deep_copy(t)
end
end
return copied
return setmetatable(copied, getmetatable(t))
end
function table.count_pairs(t)