summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-04-06 09:07:45 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-04-06 09:07:45 +0000
commit6b74d4ca9fdac5bfada26585ec38713bfc2428fd (patch)
tree7f9eecae6c02e516611a350130c17f4345e086e2 /bignum.c
parent0c176f00c12c32bbfa2d197fd9bf2f2c81c1573d (diff)
* bignum.c (bigdivrem): ny must be 0 or greater.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1308 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 99fb6bdce3..8008d5f428 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 (!zds[ny-1]) ny--;
+ while (ny-- && !zds[ny-1]) ;
if (dd) {
t2 = 0; i = ny;
while(i--) {