diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | bignum.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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. @@ -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--) { |