From 1823a2b886485e34dd46e08c636c95e2d1063e77 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 8 Mar 2005 04:54:38 +0000 Subject: (parse_conversion): When defining a commodity conversion, always mark the larger unit as having no market value (the market price is determined by looking up the base commodity and then multiplying). --- amount.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amount.cc b/amount.cc index 05421760..d1ce01ec 100644 --- a/amount.cc +++ b/amount.cc @@ -984,7 +984,8 @@ void parse_conversion(const std::string& larger_str, if (larger.commodity()) { larger.commodity().smaller = new amount_t(smaller); - larger.commodity().flags = smaller.commodity().flags; + larger.commodity().flags = (smaller.commodity().flags | + COMMODITY_STYLE_NOMARKET); } if (smaller.commodity()) smaller.commodity().larger = new amount_t(larger); -- cgit v1.2.3