diff --git a/src/cpp/ripple/Amount.cpp b/src/cpp/ripple/Amount.cpp index 88488cfdc2..c9f9c3ed3a 100644 --- a/src/cpp/ripple/Amount.cpp +++ b/src/cpp/ripple/Amount.cpp @@ -1024,7 +1024,7 @@ bool STAmount::applyOffer( { saOfferGets.throwComparable(saTakerFunds); - assert(!saOfferFunds.isZero() && !saTakerFunds.isZero()); // Both must have funds. + assert(saOfferFunds.isPositive() && saTakerFunds.isPositive()); // Both must have funds. assert(saOfferGets.isPositive() && saOfferPays.isPositive()); // Must not be a null offer. // Limit offerer funds available, by transfer fees. diff --git a/src/cpp/ripple/OfferCreateTransactor.cpp b/src/cpp/ripple/OfferCreateTransactor.cpp index 2bcdd60129..a9931fb2c2 100644 --- a/src/cpp/ripple/OfferCreateTransactor.cpp +++ b/src/cpp/ripple/OfferCreateTransactor.cpp @@ -138,7 +138,7 @@ TER OfferCreateTransactor::takeOffers( STAmount saSubTakerGets = saTakerGets-saTakerGot; // How much more is wanted. // Figure out next offer to take, if needed. - if (saTakerFunds // Taker has funds available. + if (saTakerFunds.isPositive() // Taker has funds available. && saSubTakerPays.isPositive() && saSubTakerGets.isPositive()) { @@ -162,7 +162,7 @@ TER OfferCreateTransactor::takeOffers( } } - if (!saTakerFunds) // Taker has no funds. + if (!saTakerFunds.isPositive()) // Taker has no funds. { // Done. Ran out of funds on previous round. As fees aren't calculated directly in this routine, funds are checked here. cLog(lsINFO) << "takeOffers: done: taker unfunded.";