diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-04 11:23:05 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-04 11:23:05 +0000 |
commit | dd95c9b1cdab684e10f5fe94c53334f35781b855 (patch) | |
tree | 9b8cda140e22f1a69ffd14cee24510c128cc4f87 /bignum.c | |
parent | 35f11f306d43798fa4f203b2c1c387fcda93ce25 (diff) |
* bignum.c (bigdivrem_normal): Add assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2640,6 +2640,9 @@ bigdivrem_normal(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, BDIGIT *y { int shift; + assert(zn == xn + 1); + assert(yn < xn || (xn == yn && yds[yn - 1] <= xds[xn - 1])); + shift = nlz(yds[yn-1]); if (shift) { bary_small_lshift(yds, yds, yn, shift); |