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