(AMOUNT_CMP_AMOUNT): Fixed a very serious error in basic amount math,

when lhs is zero.
This commit is contained in:
John Wiegley 2005-02-09 11:49:01 +00:00
parent f3c736006c
commit 8f373c049c

View file

@ -450,7 +450,7 @@ int amount_t::sign() const
bool amount_t::operator OP(const amount_t& amt) const \
{ \
if (! quantity) \
return ! (amt OP 0); \
return amt OP 0; \
if (! amt.quantity) \
return *this OP 0; \
\