summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
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);