summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/matcher/definition.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/server/src/matcher/definition.lua b/server/src/matcher/definition.lua
index a00337d1..9b850f94 100644
--- a/server/src/matcher/definition.lua
+++ b/server/src/matcher/definition.lua
@@ -118,7 +118,7 @@ function mt:searchCall(call, simple, i)
if metatable then
local index = self:getField(metatable, '__index')
if obj then
- self:setTable(obj, index)
+ self:setTable(obj, index, 'copy')
return obj
else
return index
@@ -224,10 +224,20 @@ function mt:searchReturn(action)
end
end
-function mt:setTable(var, tbl)
+function mt:setTable(var, tbl, mode)
if not var or not tbl then
return
end
+ if mode == 'copy' then
+ for k, v in pairs(var.childs) do
+ if tbl.childs[k] then
+ for i, info in ipairs(v) do
+ table.insert(tbl.childs[k], 1, info)
+ end
+ end
+ tbl.childs[k] = v
+ end
+ end
var.childs = tbl.childs
end