mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix build on vs2013-vs2015
This commit is contained in:
@@ -357,7 +357,11 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
|
||||
while (width++) {
|
||||
val /= 2;
|
||||
}
|
||||
#if defined(_ISOC99_SOURCE)
|
||||
val = trunc(val);
|
||||
#else
|
||||
val = val > 0 ? floor(val) : ceil(val);
|
||||
#endif
|
||||
if (val == 0 && mrb_float(x) < 0) {
|
||||
return mrb_fixnum_value(-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user