summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-11 05:22:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-11 05:22:00 +0000
commiteeb723491949b8cd0d2c61cdf15aae1061f19bb3 (patch)
tree6db28e40ecc749762f8cc2bf7b235d623468241f /bignum.c
parentba9003a0a36ebedeb584de323e6856e6da548634 (diff)
* bignum.c (bigdivrem): access boundary bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 708d74c155..ecb26a7604 100644
--- a/bignum.c
+++ b/bignum.c
@@ -918,7 +918,7 @@ bigdivrem(x, y, divp, modp)
if (modp) { /* just normalize remainder */
*modp = rb_big_clone(z);
zds = BDIGITS(*modp);
- while (0 < ny && !zds[ny-1]) ny--;
+ while (ny-- && !zds[ny]); ++ny;
if (dd) {
t2 = 0; i = ny;
while(i--) {