summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------3rd/rcedit0
-rw-r--r--script/vm/compiler.lua14
2 files changed, 8 insertions, 6 deletions
diff --git a/3rd/rcedit b/3rd/rcedit
new file mode 160000
+Subproject b807b34a644c86c0b0d89c7f073967e79202731
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index bfed8ffb..61a6076f 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -496,13 +496,15 @@ local function setCallArgNode(source, call, callNode, fixIndex)
end
end
- local eventIndex = 1
- local eventArg = call.args[eventIndex + fixIndex]
- if eventArg and eventArg.dummy then
- eventIndex = 2
- eventArg = call.args[eventIndex + fixIndex]
+ local eventIndex, eventMap
+ for i = 1, 2 do
+ local eventArg = call.args[i + fixIndex]
+ eventMap = valueMgr.getLiterals(eventArg)
+ if eventMap then
+ eventIndex = i
+ break
+ end
end
- local eventMap = valueMgr.getLiterals(eventArg)
for n in nodeMgr.eachNode(callNode) do
if n.type == 'function' then