diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-28 02:16:58 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-29 21:47:54 -0400 |
commit | 5aef1add426ca00daee5af38b27c52d7e49e3491 (patch) | |
tree | 2dff1f3405a7be97b40f23fa33e3a2c74fdc6357 /amount.cc | |
parent | 1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d (diff) | |
download | fork-ledger-5aef1add426ca00daee5af38b27c52d7e49e3491.tar.gz fork-ledger-5aef1add426ca00daee5af38b27c52d7e49e3491.tar.bz2 fork-ledger-5aef1add426ca00daee5af38b27c52d7e49e3491.zip |
Merged over fix to #205 from v2.6.1b, which deals with small commodity
rounding.
Diffstat (limited to 'amount.cc')
-rw-r--r-- | amount.cc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -703,7 +703,8 @@ bool amount_t::is_zero() const throw_(amount_error, "Cannot determine if an uninitialized amount is zero"); if (has_commodity()) { - if (quantity->prec <= commodity().precision()) + if (quantity->prec <= commodity().precision() || + quantity->has_flags(BIGINT_KEEP_PREC)) return is_realzero(); else return round(commodity().precision()).sign() == 0; |