summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vm.c b/src/vm.c
index d69617be5..9607d3c32 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1872,7 +1872,7 @@ RETRY_TRY_BLOCK:
}
ce = mrb->c->cibase + e->cioff;
- while (--ci > ce) {
+ while (ci >= ce) {
if (ci->env) {
mrb_env_unshare(mrb, ci->env);
}
@@ -1880,6 +1880,7 @@ RETRY_TRY_BLOCK:
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
goto L_RAISE;
}
+ ci--;
}
if (ce == mrb->c->cibase) {
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);