summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-31 05:43:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-31 05:43:23 -0400
commitdd9775508a09f59d17750da6e7a222fafeba5b5f (patch)
treedfa1db79ebbd65f6db071a6119c40628a2ffa430 /src
parentec6a3e80814f799d7fc0b416499bea7ac0a8cb5e (diff)
downloadfork-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.cc2
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;
}