diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-31 05:43:23 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-31 05:43:23 -0400 |
commit | dd9775508a09f59d17750da6e7a222fafeba5b5f (patch) | |
tree | dfa1db79ebbd65f6db071a6119c40628a2ffa430 /src | |
parent | ec6a3e80814f799d7fc0b416499bea7ac0a8cb5e (diff) | |
download | fork-ledger-dd9775508a09f59d17750da6e7a222fafeba5b5f.tar.gz fork-ledger-dd9775508a09f59d17750da6e7a222fafeba5b5f.tar.bz2 fork-ledger-dd9775508a09f59d17750da6e7a222fafeba5b5f.zip |
amount_t::is_zero() wasn't checking for '-'.
Diffstat (limited to 'src')
-rw-r--r-- | src/amount.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amount.cc b/src/amount.cc index 36539232..f0266b36 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -641,7 +641,7 @@ bool amount_t::is_zero() const stream_out_mpq(out, MP(quantity), commodity().precision()); for (const char * p = out.str().c_str(); *p; p++) - if (*p != '0' && *p != '.') + if (*p != '0' && *p != '.' && *p != '-') return false; return true; } |