summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vm.c b/src/vm.c
index c5639130d..975899256 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2884,12 +2884,11 @@ RETRY_TRY_BLOCK:
CASE(OP_STOP) {
/* stop VM */
L_STOP:
- {
- int epos = mrb->c->ci->epos;
-
- while (mrb->c->eidx > epos) {
- ecall(mrb);
- }
+ while (mrb->c->ci > mrb->c->cibase) {
+ cipop(mrb);
+ }
+ while (mrb->c->eidx > 0) {
+ ecall(mrb);
}
ERR_PC_CLR(mrb);
mrb->jmp = prev_jmp;