Coerce round to zero was broken due to a bad sign.

This commit is contained in:
JoelKatz
2013-04-17 23:17:12 -07:00
parent 6bdb26d5d4
commit 8b94a15c54

View File

@@ -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)
{