summaryrefslogtreecommitdiff
path: root/src/annotate.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-09 06:51:15 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-09 06:51:15 -0600
commit605fcde2e7c7d9fa05046ca81bff5a75cf2baa94 (patch)
tree1f3edcaf15a97ab7f9bbe43038a6d8ba7a7dea04 /src/annotate.h
parent1a6ec4e8b4b71ef36cf81bea6e42abbc8610f1ac (diff)
downloadfork-ledger-605fcde2e7c7d9fa05046ca81bff5a75cf2baa94.tar.gz
fork-ledger-605fcde2e7c7d9fa05046ca81bff5a75cf2baa94.tar.bz2
fork-ledger-605fcde2e7c7d9fa05046ca81bff5a75cf2baa94.zip
Corrected value_expr annotation comparisons
Diffstat (limited to 'src/annotate.h')
-rw-r--r--src/annotate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/annotate.h b/src/annotate.h
index c1f52a62..22c3d8ad 100644
--- a/src/annotate.h
+++ b/src/annotate.h
@@ -93,7 +93,9 @@ struct annotation_t : public supports_flags<>,
return (price == rhs.price &&
date == rhs.date &&
tag == rhs.tag &&
- value_expr == rhs.value_expr);
+ (value_expr && rhs.value_expr ?
+ value_expr->text() == rhs.value_expr->text() :
+ value_expr == rhs.value_expr));
}
void parse(std::istream& in);