diff options
-rw-r--r-- | src/commodity.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commodity.cc b/src/commodity.cc index a0827e7a..0d6c11c6 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -512,7 +512,7 @@ void commodity_t::parse_symbol(std::istream& in, string& symbol) for (std::size_t i = 0; i < bytes; i++) { in.get(c); if (in.bad() || in.eof()) - break; + throw_(amount_error, _("Invalid UTF-8 encoding for commodity name")); *_p++ = c; } } @@ -526,7 +526,7 @@ void commodity_t::parse_symbol(std::istream& in, string& symbol) if (c == '\\') { in.get(c); if (in.eof()) - break; + throw_(amount_error, _("Backslash at end of commodity name")); } *_p++ = c; } |