diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/vm/function.lua | 12 | ||||
-rw-r--r-- | server/src/vm/local.lua | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua index 4c2f0be5..b6a8ae87 100644 --- a/server/src/vm/function.lua +++ b/server/src/vm/function.lua @@ -78,7 +78,11 @@ function mt:loadLocal(name) local locals = self.locals[i] local loc = locals[name] if loc then - return loc + if loc:getSource() then + return loc + else + locals[name] = nil + end end if self.chunk[i] then break @@ -86,7 +90,11 @@ function mt:loadLocal(name) end local uv = self.upvalues[name] if uv then - return uv + if uv:getSource() then + return uv + else + self.upvalues[name] = nil + end end return nil end diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua index c6e67dbf..3591eab9 100644 --- a/server/src/vm/local.lua +++ b/server/src/vm/local.lua @@ -114,8 +114,7 @@ function mt:shadow(old) self._shadow = group if not self:getSource() then - log.error(table.dump(self)) - log.error(table.dump(getmetatable(self))) + log.error('local no source') return end |