Corrected a case for value < value
This commit is contained in:
parent
93e0d8c67a
commit
7e79cd82cd
1 changed files with 3 additions and 1 deletions
|
|
@ -857,7 +857,9 @@ bool value_t::is_less_than(const value_t& val) const
|
|||
case INTEGER:
|
||||
return as_amount() < val.as_long();
|
||||
case AMOUNT:
|
||||
if (as_amount().commodity() == val.as_amount().commodity())
|
||||
if (as_amount().commodity() == val.as_amount().commodity() ||
|
||||
! as_amount().has_commodity() ||
|
||||
! val.as_amount().has_commodity())
|
||||
return as_amount() < val.as_amount();
|
||||
else
|
||||
return commodity_t::compare_by_commodity()(&as_amount(), &val.as_amount());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue