From 9be232cd80a4cb287a78ec88d15450a9800f3c3b Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 24 Feb 2023 14:22:16 +0100 Subject: [PATCH] Bug 798572 - Parse numbers with two minus signs as a positive numbers --- gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp index 9c4acab00a..9bc6fb1323 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp @@ -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 */