summaryrefslogtreecommitdiff
path: root/server/src/vm/vm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r--server/src/vm/vm.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 0e84468b..57301ed5 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -47,8 +47,8 @@ function mt:buildTable(source)
self:instantSource(obj)
self:instantSource(key)
key:bindValue(value, 'set')
- if key.index then
- local index = self:getIndex(obj)
+ if key.type == 'index' then
+ local index = self:getIndex(key)
key:set('parent', tbl)
tbl:setChild(index, value, key)
else
@@ -695,6 +695,8 @@ function mt:getExp(exp)
return value
elseif tp == 'simple' then
return self:getSimple(exp)
+ elseif tp == 'index' then
+ return self:getIndex(exp)
elseif tp == 'binary' then
return self:getBinary(exp)
elseif tp == 'unary' then