summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/src
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-complex/src')
-rw-r--r--mrbgems/mruby-complex/src/complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-complex/src/complex.c b/mrbgems/mruby-complex/src/complex.c
index 85735b704..6b7486ab0 100644
--- a/mrbgems/mruby-complex/src/complex.c
+++ b/mrbgems/mruby-complex/src/complex.c
@@ -122,7 +122,7 @@ complex_to_i(mrb_state *mrb, mrb_value self)
if (p->imaginary != 0) {
mrb_raisef(mrb, E_RANGE_ERROR, "can't convert %v into Float", self);
}
- return mrb_int_value(mrb, p->real);
+ return mrb_int_value(mrb, (mrb_int)p->real);
}
static mrb_value