diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-15 08:15:40 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-15 08:15:40 +0000 |
commit | 919cc1e53e77db0c72ea307ffd0a0d4eec8dbeee (patch) | |
tree | 83e9b7cfa774345b7dce99515cb0d937fbf91418 | |
parent | 54a22fb8c7f126164e3fa4f9edda4af5badde346 (diff) | |
download | ruby-919cc1e53e77db0c72ea307ffd0a0d4eec8dbeee.tar.gz |
* bignum.c (bigmul1_normal): Shrink the result Bignum length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | bignum.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sat Jun 15 17:14:32 2013 Tanaka Akira <akr@fsij.org> + + * bignum.c (bigmul1_normal): Shrink the result Bignum length. + Sat Jun 15 10:19:42 2013 Zachary Scott <zachary@zacharyscott.net> * ext/bigdecimal/bigdecimal.c: Update overview formatting of headers @@ -3139,7 +3139,7 @@ bigmul1_single(VALUE x, VALUE y) static VALUE bigmul1_normal(VALUE x, VALUE y) { - long xl = RBIGNUM_LEN(x), yl = RBIGNUM_LEN(y), i, j = xl + yl + 1; + long xl = RBIGNUM_LEN(x), yl = RBIGNUM_LEN(y), i, j = xl + yl; BDIGIT_DBL n = 0; VALUE z = bignew(j, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y)); BDIGIT *xds, *yds, *zds; |