summaryrefslogtreecommitdiffhomepage
path: root/src/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/numeric.c')
-rw-r--r--src/numeric.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/numeric.c b/src/numeric.c
index e1898301e..988342e88 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -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);
}