diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-23 04:42:44 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:30 -0400 |
commit | 6853db57e6fdb6fd95764be1f35af0006c9e2ef9 (patch) | |
tree | bf24550cbc6053c51bf2f3fdcf27f39a4c989f24 /amount.cc | |
parent | be9f18ccfe81acdd2f34b27352f2843235fab69b (diff) | |
download | fork-ledger-6853db57e6fdb6fd95764be1f35af0006c9e2ef9.tar.gz fork-ledger-6853db57e6fdb6fd95764be1f35af0006c9e2ef9.tar.bz2 fork-ledger-6853db57e6fdb6fd95764be1f35af0006c9e2ef9.zip |
All tests now working again. Reduced size of entity_t and
transaction_t considerably.
Diffstat (limited to 'amount.cc')
-rw-r--r-- | amount.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -980,7 +980,7 @@ void amount_t::print(std::ostream& _out, bool omit_commodity, if (negative) out << "-"; - if (mpz_sgn(quotient) == 0) { + if (! quantity || mpz_sgn(quotient) == 0) { out << '0'; } else if (! (comm.flags() & COMMODITY_STYLE_THOUSANDS)) { @@ -1022,7 +1022,7 @@ void amount_t::print(std::ostream& _out, bool omit_commodity, } } - if (precision) { + if (quantity && precision) { std::ostringstream final; final.width(precision); final.fill('0'); |