mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798572 - Parse numbers with two minus signs as a positive numbers
This commit is contained in:
parent
549c93e005
commit
9be232cd80
@ -139,7 +139,7 @@ GncNumeric parse_monetary (const std::string &str, int currency_format)
|
||||
if(!boost::regex_search(str, boost::regex("[0-9]")))
|
||||
throw std::invalid_argument (_("Value doesn't appear to contain a valid number."));
|
||||
|
||||
auto expr = boost::make_u32regex("[[:Sc:][:blank:]]");
|
||||
auto expr = boost::make_u32regex("[[:Sc:][:blank:]]|--");
|
||||
std::string str_no_symbols = boost::u32regex_replace(str, expr, "");
|
||||
|
||||
/* Convert based on user chosen currency format */
|
||||
|
Loading…
Reference in New Issue
Block a user