From 7e79cd82cd4ad5f87f40e6beebdb53e65bb11168 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 6 Mar 2010 00:58:05 -0500 Subject: Corrected a case for value < value --- src/value.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()); -- cgit v1.2.3