From 61741a5cc898272627491b4cd8d5404048169df1 Mon Sep 17 00:00:00 2001 From: Richard Try Date: Thu, 19 Dec 2024 01:37:34 +0300 Subject: [PATCH] Copy metatable in table.deepcopy Copy metatable as well during deep copying --- res/scripts/stdmin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/scripts/stdmin.lua b/res/scripts/stdmin.lua index 13934e066..76df31e2a 100644 --- a/res/scripts/stdmin.lua +++ b/res/scripts/stdmin.lua @@ -74,7 +74,7 @@ function table.deep_copy(t) end end - return copied + return setmetatable(copied, getmetatable(t)) end function table.count_pairs(t)