aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/lang/vm/vm.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/lang/vm/vm.go b/pkg/lang/vm/vm.go
index 74f9f46..6746e64 100644
--- a/pkg/lang/vm/vm.go
+++ b/pkg/lang/vm/vm.go
@@ -27,7 +27,10 @@ func (vm *VM) Run() {
for vm.pc < vm.code.Len() {
op, advance := vm.code.GetOp(vm.pc)
vm.pc += advance
- vm.step(op)
+
+ if vm.step(op) == stepDecisionHalt {
+ return
+ }
}
}