mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
redefine POST/NEG FIXABLE using INT_MIN/MAX
This commit is contained in:
+1
-2
@@ -565,8 +565,7 @@ mrb_convert_to_integer(mrb_state *mrb, mrb_value val, int base)
|
||||
switch (mrb_type(val)) {
|
||||
case MRB_TT_FLOAT:
|
||||
if (base != 0) goto arg_error;
|
||||
if (mrb_float(val) <= (double)FIXNUM_MAX
|
||||
&& mrb_float(val) >= (double)FIXNUM_MIN) {
|
||||
if (FIXABLE(mrb_float(val))) {
|
||||
break;
|
||||
}
|
||||
return mrb_flt2big(mrb, mrb_float(val));
|
||||
|
||||
Reference in New Issue
Block a user