From 87b6a1e43fcf3d0f33e37ff811679486637f0809 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 2 Mar 2023 15:04:29 -0800 Subject: Do not perform commodity reduction when parsing a format directive --- src/textual.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/textual.cc') diff --git a/src/textual.cc b/src/textual.cc index 62007abb..5276c92b 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -1132,10 +1132,12 @@ void instance_t::commodity_format_directive(commodity_t& comm, string format) // observational formatting. trim(format); amount_t amt; - amt.parse(format); + amt.parse(format, PARSE_NO_REDUCE); if (amt.commodity() != comm) - throw_(parse_error, _f("commodity directive symbol %1% and format directive symbol %2% should be the same") % - comm.symbol() % amt.commodity().symbol()); + throw_(parse_error, + _f("commodity directive symbol %1% and format directive symbol %2% should be the same") + % comm.symbol() + % amt.commodity().symbol()); amt.commodity().add_flags(COMMODITY_STYLE_NO_MIGRATE); VERIFY(amt.valid()); } -- cgit v1.2.3