diff options
author | John Wiegley <johnw@newartisans.com> | 2010-03-06 00:58:05 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-03-06 00:58:05 -0500 |
commit | 7e79cd82cd4ad5f87f40e6beebdb53e65bb11168 (patch) | |
tree | 73dc2c658e2f4ab0a342794756a0016ed462d48c /src | |
parent | 93e0d8c67a1123d0b4eefcc53d00ba892142fd49 (diff) | |
download | fork-ledger-7e79cd82cd4ad5f87f40e6beebdb53e65bb11168.tar.gz fork-ledger-7e79cd82cd4ad5f87f40e6beebdb53e65bb11168.tar.bz2 fork-ledger-7e79cd82cd4ad5f87f40e6beebdb53e65bb11168.zip |
Corrected a case for value < value
Diffstat (limited to 'src')
-rw-r--r-- | src/value.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/value.cc b/src/value.cc index a1316568..54798162 100644 --- a/src/value.cc +++ b/src/value.cc @@ -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()); |