diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | bignum.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sun Aug 18 03:18:45 2013 Tanaka Akira <akr@fsij.org> + + * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn). + Sun Aug 18 00:44:58 2013 Tanaka Akira <akr@fsij.org> * bignum.c (BIGDIVREM_EXTRA_WORDS): Redefine to 1. @@ -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); |