(AMOUNT_CMP_AMOUNT): Fixed a very serious error in basic amount math,
when lhs is zero.
This commit is contained in:
parent
f3c736006c
commit
8f373c049c
1 changed files with 1 additions and 1 deletions
|
|
@ -450,7 +450,7 @@ int amount_t::sign() const
|
||||||
bool amount_t::operator OP(const amount_t& amt) const \
|
bool amount_t::operator OP(const amount_t& amt) const \
|
||||||
{ \
|
{ \
|
||||||
if (! quantity) \
|
if (! quantity) \
|
||||||
return ! (amt OP 0); \
|
return amt OP 0; \
|
||||||
if (! amt.quantity) \
|
if (! amt.quantity) \
|
||||||
return *this OP 0; \
|
return *this OP 0; \
|
||||||
\
|
\
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue