From dd9775508a09f59d17750da6e7a222fafeba5b5f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 31 Jan 2009 05:43:23 -0400 Subject: amount_t::is_zero() wasn't checking for '-'. --- src/amount.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3