Skip to content

Commit

Permalink
fix #1088
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Apr 24, 2022
1 parent 4876ff3 commit 01a4bfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* `FIX` [#1051](https://github.com/sumneko/lua-language-server/issues/1051)
* `FIX` [#1072](https://github.com/sumneko/lua-language-server/issues/1072)
* `FIX` [#1077](https://github.com/sumneko/lua-language-server/issues/1077)
* `FIX` [#1088](https://github.com/sumneko/lua-language-server/issues/1088)
* `FIX` runtime errors

## 3.1.0
Expand Down
6 changes: 4 additions & 2 deletions script/vm/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,10 @@ function vm.compileCallArg(arg, call, index)
if call.node.special == 'pcall'
or call.node.special == 'xpcall' then
local fixIndex = call.node.special == 'pcall' and 1 or 2
callNode = vm.compileNode(call.args[1])
compileCallArgNode(arg, call, callNode, fixIndex, index - fixIndex)
if call.args and call.args[1] then
callNode = vm.compileNode(call.args[1])
compileCallArgNode(arg, call, callNode, fixIndex, index - fixIndex)
end
end
return vm.getNode(arg)
end
Expand Down

0 comments on commit 01a4bfa

Please sign in to comment.