summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 1fbc96c8..d5b7f03d 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -998,7 +998,8 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags)
if (! symbol.empty())
comm_flags |= COMMODITY_STYLE_SUFFIXED;
- if (! in.eof() && ((n = static_cast<char>(in.peek())) != '\n'))
+ if (! flags.has_flags(PARSE_NO_ANNOT) &&
+ ! in.eof() && ((n = static_cast<char>(in.peek())) != '\n'))
details.parse(in);
}
} else {
@@ -1010,7 +1011,8 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags)
parse_quantity(in, quant);
- if (! quant.empty() && ! in.eof() &&
+ if (! flags.has_flags(PARSE_NO_ANNOT) &&
+ ! quant.empty() && ! in.eof() &&
((n = static_cast<char>(in.peek())) != '\n'))
details.parse(in);
}