summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-07 07:44:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-07 07:44:18 +0000
commita682b5324bedfeb346e486c8ffd3410d77b59f0c (patch)
tree3e2293505362822e133e0f2d53e8338acba3b15b
parent753450b7c4e4e3c8730c3337a72ab2cbed7b47cf (diff)
* bignum.c (bigdivrem): bignum zero's len should not be 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--bignum.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c7b0482e3..9541afbc79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Oct 7 16:43:07 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * bignum.c (bigdivrem): bignum zero's len should not be 0.
+
Mon Oct 7 15:36:42 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* bignum.c (bigdivmod): wrong condition check for Bignum zero.
diff --git a/bignum.c b/bignum.c
index 1e08346189..a68e6ad59d 100644
--- a/bignum.c
+++ b/bignum.c
@@ -928,7 +928,7 @@ bigdivrem(x, y, divp, modp)
if (modp) { /* just normalize remainder */
*modp = rb_big_clone(z);
zds = BDIGITS(*modp);
- while (ny-- && !zds[ny]); ++ny;
+ while (--ny && !zds[ny]); ++ny;
if (dd) {
t2 = 0; i = ny;
while(i--) {