summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-11-10 04:26:33 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:40:48 -0400
commit1db60b12e2341cd69c297de643ff46fbf9e4b970 (patch)
treea234ffca6eb451775de7e8158b72330057b4012a /amount.cc
parentc9fb11bd60a2170fb896d77ff8d7706f563ad597 (diff)
downloadfork-ledger-1db60b12e2341cd69c297de643ff46fbf9e4b970.tar.gz
fork-ledger-1db60b12e2341cd69c297de643ff46fbf9e4b970.tar.bz2
fork-ledger-1db60b12e2341cd69c297de643ff46fbf9e4b970.zip
updated to 2.02
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 << "-";