mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
numeric.c (int_div): add checks for division by zero.
This commit is contained in:
@@ -160,7 +160,6 @@ int_div(mrb_state *mrb, mrb_value x)
|
||||
#endif
|
||||
mrb_int a = mrb_integer(x);
|
||||
|
||||
if (a == 0) return mrb_fixnum_value(0);
|
||||
if (mrb_integer_p(y)) {
|
||||
return mrb_div_int_value(mrb, a, mrb_integer(y));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user