| Index: src/bignum.cc
|
| diff --git a/src/bignum.cc b/src/bignum.cc
|
| index 9436322ed49b38080875e1a5eceef7861fbc3745..c8b61eef5025439847ae46e31fa69b98695f2f92 100644
|
| --- a/src/bignum.cc
|
| +++ b/src/bignum.cc
|
| @@ -735,6 +735,13 @@ void Bignum::BigitsShiftLeft(int shift_amount) {
|
|
|
|
|
| void Bignum::SubtractTimes(const Bignum& other, int factor) {
|
| +#ifdef DEBUG
|
| + Bignum a, b;
|
| + a.AssignBignum(*this);
|
| + b.AssignBignum(other);
|
| + b.MultiplyByUInt32(factor);
|
| + a.SubtractBignum(b);
|
| +#endif
|
| ASSERT(exponent_ <= other.exponent_);
|
| if (factor < 3) {
|
| for (int i = 0; i < factor; ++i) {
|
| @@ -758,9 +765,9 @@ void Bignum::SubtractTimes(const Bignum& other, int factor) {
|
| Chunk difference = bigits_[i] - borrow;
|
| bigits_[i] = difference & kBigitMask;
|
| borrow = difference >> (kChunkSize - 1);
|
| - ++i;
|
| }
|
| Clamp();
|
| + ASSERT(Bignum::Equal(a, *this));
|
| }
|
|
|
|
|
|
|