From 17620edaf8e5b74ea5cc7e16caf0cafe0d4ca851 Mon Sep 17 00:00:00 2001 From: Tom van Dijck Date: Wed, 6 Apr 2016 15:45:15 -0700 Subject: [PATCH] table.deepclone should clone the metatable too. --- src/base/table.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/table.lua b/src/base/table.lua index ba653648..65efce78 100644 --- a/src/base/table.lua +++ b/src/base/table.lua @@ -53,6 +53,7 @@ clone[key] = copy(value) end + setmetatable(clone, getmetatable(object)) return clone end