summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/amount.cc b/amount.cc
index 0cb2df18..d0c9f6a8 100644
--- a/amount.cc
+++ b/amount.cc
@@ -620,6 +620,9 @@ std::string amount_t::quantity_string() const
}
mpz_set(rquotient, remainder);
+ if (mpz_sgn(quotient) == 0 && mpz_sgn(rquotient) == 0)
+ return "0";
+
if (negative)
out << "-";