summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-17 18:21:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-17 18:21:46 +0000
commitc106d194455e9087db416a9e7ba62257135cf119 (patch)
treef6c953d56640c5bc6ec3054d131712a31acf7909 /bignum.c
parent517c201ed68446524e46d6aafa7675cd6770f2f4 (diff)
* bignum.c (rb_big2str1): Use power_level instead of bitsize(xn).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index d3b7ccea71..0da5199b59 100644
--- a/bignum.c
+++ b/bignum.c
@@ -4569,7 +4569,7 @@ rb_big2str1(VALUE x, int base)
VALUE tmpw = 0;
BDIGIT *wds;
size_t wn;
- wn = bitsize(xn) + 1 + RBIGNUM_LEN(power);
+ wn = power_level + RBIGNUM_LEN(power);
wds = ALLOCV_N(BDIGIT, tmpw, xn + wn);
MEMCPY(wds, xds, BDIGIT, xn);
big2str_karatsuba(&b2s_data, wds, xn, wn, power_level, 0);