From 01988e3be7554c0743b8f8b4913bce828f360e35 Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Tue, 13 May 2014 11:46:29 -0400 Subject: Make sure c is large enough if there is an overflow --- src/numeric.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/numeric.c') diff --git a/src/numeric.c b/src/numeric.c index 8af7bfd15..b3daddf85 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -702,7 +702,8 @@ mrb_fixnum_mul(mrb_state *mrb, mrb_value x, mrb_value y) a = mrb_fixnum(x); if (mrb_fixnum_p(y)) { - mrb_int b, c; + mrb_float c; + mrb_int b; if (a == 0) return x; b = mrb_fixnum(y); -- cgit v1.2.3