mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
codegen.c: fix the negative division regression; fix #5678
This commit is contained in:
@@ -852,7 +852,7 @@ gen_muldiv(codegen_scope *s, uint8_t op, uint16_t dst)
|
||||
}
|
||||
else { /* OP_DIV */
|
||||
if (n0 == MRB_INT_MIN && n == -1) goto normal;
|
||||
n = n0 / n;
|
||||
n = mrb_div_int(s->mrb, n0, n);
|
||||
}
|
||||
s->pc = addr_pc(s, data0.addr);
|
||||
gen_int(s, dst, n);
|
||||
|
||||
Reference in New Issue
Block a user