summaryrefslogtreecommitdiff
path: root/server/src/vm/value.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/value.lua')
-rw-r--r--server/src/vm/value.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index c93fda90..2a1c14d1 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -446,6 +446,9 @@ end
function mt:setFunction(func)
self._func = func.id
+ if self._global then
+ func:markGlobal()
+ end
end
function mt:getFunction()
@@ -502,6 +505,10 @@ function mt:markGlobal()
self:rawEach(function (index, value)
value:markGlobal()
end)
+ local func = self:getFunction()
+ if func then
+ func:markGlobal()
+ end
end
function mt:isGlobal()