Skip to content

Commit

Permalink
fix: fix bug about varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
gufeijun committed Jun 11, 2022
1 parent b6b25e1 commit cc0d957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/instruction.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ func callFunc(closure *types.Closure, vm *VM, argCnt uint32, wantRtnCnt int) {
vm.curProto.stack.Pop()
argCnt--
}
vm.curProto.stack.Push(&arr)
vm.curProto.stack.Push(types.NewArray(arr))
} else {
// pop out extra arguments
for argCnt > parCnt {
Expand Down

0 comments on commit cc0d957

Please sign in to comment.