Terminate float right shift if shift value is too big.

parent 6af0effd
......@@ -484,6 +484,10 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
if (width < 0) {
while (width++) {
val /= 2;
if (val < 1.0) {
val = 0;
break;
}
}
#if defined(_ISOC99_SOURCE)
val = trunc(val);
......
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