diff options
Diffstat (limited to 'server/src/matcher/library.lua')
-rw-r--r-- | server/src/matcher/library.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/src/matcher/library.lua b/server/src/matcher/library.lua index 19e3b8e0..f6211431 100644 --- a/server/src/matcher/library.lua +++ b/server/src/matcher/library.lua @@ -65,6 +65,14 @@ local function mergeSource(alllibs, name, lib) end end +local function copy(t) + local new = {} + for k, v in pairs(t) do + new[k] = v + end + return new +end + local function insert(tbl, name, key, value) if not name or not key then return @@ -76,7 +84,7 @@ local function insert(tbl, name, key, value) child = {}, } end - tbl[name].child[key] = value + tbl[name].child[key] = copy(value) end local function mergeParent(alllibs, name, lib) |