Detect overflow in `flo_shift()`.

parent 9fbf0ef8
......@@ -610,7 +610,9 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
val *= 2;
}
}
if (FIXABLE_FLOAT(val))
return mrb_int_value(mrb, (mrb_int)val);
return mrb_float_value(mrb, val);
}
static mrb_value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment