summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-23 16:08:23 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-23 16:08:23 +0000
commit10ca8a4b07ea925c4a71c5da6067688fd8ff0bff (patch)
tree54926ed40ff4f7d9ce27184e8080e07eef49c263 /ext/bigdecimal/bigdecimal.c
parent4efba669ece01e2b800dba55ee9fe235f9a0bb45 (diff)
* ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
of FIX2INT to avoid conversion error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index b4656ea0c3..29240c7da4 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2194,7 +2194,7 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
return ToValue(y);
}
-retry:
+ retry:
switch (TYPE(vexp)) {
case T_FIXNUM:
break;
@@ -2381,7 +2381,7 @@ retry:
}
}
- int_exp = FIX2INT(vexp);
+ int_exp = FIX2LONG(vexp);
ma = int_exp;
if (ma < 0) ma = -ma;
if (ma == 0) ma = 1;