diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-11-17 04:41:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-11-17 04:41:19 +0000 |
commit | 21efb309e7bd3985647d806b1ef7969c16afba02 (patch) | |
tree | 371de1c897ff6129461e048a07f95462a3d8cd2e /bignum.c | |
parent | 46608d361a199ee96ce71043d03d5e2dbed3cf66 (diff) | |
download | ruby-21efb309e7bd3985647d806b1ef7969c16afba02.tar.gz |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -903,7 +903,8 @@ bigdivrem(x, y, divp, modp) *modp = rb_big_clone(z); if (dd) { zds = BDIGITS(*modp); - t2 = 0; i = ny; + while (ny-- && !zds[ny]) ; + t2 = 0; i = ++ny; while(i--) { t2 = (t2 | zds[i]) >> dd; q = zds[i]; |