summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/matcher/vm.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 928a954f..2c89b5e7 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -873,9 +873,10 @@ function mt:createEnvironment()
value = self:setValue(field, value)
end
- -- 设置 _G 等于 _ENV
+ -- 设置 _G 使用 _ENV 的child
local g = self:getField(envValue, '_G')
- self:setValue(g, envValue)
+ local gValue = self:getValue(g)
+ gValue.child = envValue.child
end
local function compile(ast)