diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/vm/value.lua | 4 | ||||
-rw-r--r-- | server/src/vm/vm.lua | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index c9e833d6..9fd1fdf1 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -124,10 +124,6 @@ end function mt:setChild(index, value, source) self:setType('table', 0.5) - -- TODO 临时检测 - if type(index) == 'table' and index.type ~= 'value' then - error('child index must be a value', table.dump(index)) - end self:rawSet(index, value, source) return value end diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index df2cd234..469e9050 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -408,7 +408,8 @@ function mt:getIndex(source) child:set('in index', source) return child[1] else - return self:getExp(child) + local index = self:getExp(child) + return self:getFirstInMulti(index) end end |