Avoid negating MRB_INT_MIN which is impossible.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-11-06 12:51:44 +09:00
parent d93fc6593f
commit 2a52ebcc56
+1
View File
@@ -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);
}