amount_t::is_zero() wasn't checking for '-'.

This commit is contained in:
John Wiegley 2009-01-31 05:43:23 -04:00
parent ec6a3e8081
commit dd9775508a

View file

@ -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;
}