summaryrefslogtreecommitdiff
path: root/server/src/vm/function.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/function.lua')
-rw-r--r--server/src/vm/function.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua
index 1106a0c9..a6f2b0cf 100644
--- a/server/src/vm/function.lua
+++ b/server/src/vm/function.lua
@@ -145,7 +145,7 @@ function mt:loadLabel(name)
return nil
end
-function mt:setReturn(index, value)
+function mt:rawSetReturn(index, value)
if self._removed then
return
end
@@ -161,10 +161,20 @@ function mt:setReturn(index, value)
end
end
+function mt:setReturn(index, value)
+ if self._emmyReturns then
+ return
+ end
+ return self:rawSetReturn(index, value)
+end
+
function mt:mergeReturn(index, value)
if self._removed then
return
end
+ if self._emmyReturns then
+ return
+ end
self:set('hasReturn', true)
if not self.returns then
self.returns = createMulti()
@@ -324,7 +334,7 @@ function mt:run(vm)
value:mergeType(destValue)
end
end
- self:setReturn(i, value)
+ self:rawSetReturn(i, value)
end
end
end