From 7ef8001505eec94bcef5c7843e1e71675f8e1a7c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 24 Sep 2012 14:36:48 -0700 Subject: [PATCH] Audit all construction cases, fix broken ones. --- src/Amount.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Amount.cpp b/src/Amount.cpp index 9fc46089e..ebd2597a9 100644 --- a/src/Amount.cpp +++ b/src/Amount.cpp @@ -632,9 +632,9 @@ STAmount operator+(const STAmount& v1, const STAmount& v2) int64 fv = vv1 + vv2; if (fv >= 0) - return STAmount(v1.name, v1.mCurrency, fv, ov1, false); + return STAmount(v1.name, v1.mCurrency, v1.mIssuer, fv, ov1, false); else - return STAmount(v1.name, v1.mCurrency, -fv, ov1, true); + return STAmount(v1.name, v1.mCurrency, v1.mIssuer, -fv, ov1, true); } STAmount operator-(const STAmount& v1, const STAmount& v2) @@ -664,9 +664,9 @@ STAmount operator-(const STAmount& v1, const STAmount& v2) int64 fv = vv1 - vv2; if (fv >= 0) - return STAmount(v1.name, v1.mCurrency, fv, ov1, false); + return STAmount(v1.name, v1.mCurrency, v1.mIssuer, fv, ov1, false); else - return STAmount(v1.name, v1.mCurrency, -fv, ov1, true); + return STAmount(v1.name, v1.mCurrency, v1.mIssuer, -fv, ov1, true); } STAmount STAmount::divide(const STAmount& num, const STAmount& den, const uint160& uCurrencyID, const uint160& uIssuerID)