From 8b94a15c543d893469d8c4618c94de9d52180022 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 17 Apr 2013 23:17:12 -0700 Subject: [PATCH] Coerce round to zero was broken due to a bad sign. --- src/cpp/ripple/AmountRound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/AmountRound.cpp b/src/cpp/ripple/AmountRound.cpp index 3b77d26b8..8980c59b9 100644 --- a/src/cpp/ripple/AmountRound.cpp +++ b/src/cpp/ripple/AmountRound.cpp @@ -105,7 +105,7 @@ STAmount STAmount::addRound(const STAmount& v1, const STAmount& v2, bool roundUp } int64 fv = vv1 + vv2; - if ((fv >= -10) && (fv <= -10)) + if ((fv >= -10) && (fv <= 10)) return STAmount(v1.getFName(), v1.mCurrency, v1.mIssuer); else if (fv >= 0) { @@ -170,7 +170,7 @@ STAmount STAmount::subRound(const STAmount& v1, const STAmount& v2, bool roundUp } int64 fv = vv1 + vv2; - if ((fv >= -10) && (fv <= -10)) + if ((fv >= -10) && (fv <= 10)) return STAmount(v1.getFName(), v1.mCurrency, v1.mIssuer); else if (fv >= 0) {