Fixed wrong range condition in OP_JMPUW

fixed #6441
This commit is contained in:
dearblue
2024-12-03 22:14:50 +09:00
parent 4a99f28ec3
commit 95e2f8e844
2 changed files with 58 additions and 1 deletions
+1 -1
View File
@@ -1721,7 +1721,7 @@ RETRY_TRY_BLOCK:
if (irep->clen > 0 &&
(ch = catch_handler_find(irep, ci->pc, MRB_CATCH_FILTER_ENSURE))) {
/* avoiding a jump from a catch handler into the same handler */
if (a < mrb_irep_catch_handler_unpack(ch->begin) || a >= mrb_irep_catch_handler_unpack(ch->end)) {
if (a < mrb_irep_catch_handler_unpack(ch->begin) || a > mrb_irep_catch_handler_unpack(ch->end)) {
THROW_TAGGED_BREAK(mrb, RBREAK_TAG_JUMP, mrb->c->ci, mrb_fixnum_value(a));
}
}