summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-05-27 03:48:05 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:10 -0400
commit3797cb1ad92c576d81f493d57fbaa5e576ea8c97 (patch)
tree4d653e61fa960dba80d9861dd2576f004cbc3c09
parent65bfc5756cbc18b411f5999e373d500cef976cdd (diff)
downloadfork-ledger-3797cb1ad92c576d81f493d57fbaa5e576ea8c97.tar.gz
fork-ledger-3797cb1ad92c576d81f493d57fbaa5e576ea8c97.tar.bz2
fork-ledger-3797cb1ad92c576d81f493d57fbaa5e576ea8c97.zip
(amount_t::parse): Only set the SUFFIXED flag if there is actually a
commodity symbol.
-rw-r--r--amount.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/amount.cc b/amount.cc
index d1ce01ec..16d9cbf4 100644
--- a/amount.cc
+++ b/amount.cc
@@ -871,7 +871,8 @@ void amount_t::parse(std::istream& in, unsigned short flags)
parse_commodity(in, symbol);
- comm_flags |= COMMODITY_STYLE_SUFFIXED;
+ if (! symbol.empty())
+ comm_flags |= COMMODITY_STYLE_SUFFIXED;
}
} else {
parse_commodity(in, symbol);