about summary refs log tree commit diff
path: root/pkg
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-06-01 16:33:06 +0000
committerGitHub <noreply@github.com>2022-06-01 16:33:06 +0000
commit33671436680e7922001df9921ee582c486c7c3f4 (patch)
tree3fb981010bd137573135f76f743d7c56d8f600ec /pkg
parent6afc2a101037f18e09512f725501334258a13509 (diff)
downloadjinx-33671436680e7922001df9921ee582c486c7c3f4.tar.zst
jinx-33671436680e7922001df9921ee582c486c7c3f4.zip
Always return from native functions implicitly
Diffstat (limited to 'pkg')
-rw-r--r--pkg/lang/vm/exec.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/lang/vm/exec.go b/pkg/lang/vm/exec.go
index 76a2f34..94557dc 100644
--- a/pkg/lang/vm/exec.go
+++ b/pkg/lang/vm/exec.go
@@ -621,6 +621,10 @@ func (vm *VM) execCall(argCount uint) error {
 			return err
 		}
 
+		if _, err := vm.stack.PopCall(); err != nil {
+			return err
+		}
+
 		if !val.IsEmpty() {
 			vm.stack.Push(val)
 		}