mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Avoid negating MRB_INT_MIN which is impossible.
This commit is contained in:
@@ -646,6 +646,7 @@ flo_rshift(mrb_state *mrb, mrb_value x)
|
||||
mrb_int width;
|
||||
|
||||
mrb_get_args(mrb, "i", &width);
|
||||
if (width == MRB_INT_MIN) return flo_shift(mrb, x, -MRB_INT_BIT);
|
||||
return flo_shift(mrb, x, -width);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user