From d78d3a6c156bc159a6726f89f1bdfc274800a14f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 17 Oct 2016 14:37:01 +0100 Subject: Fix make_raw() failure when thousands_sep is a period (.) --- src/raw_convert.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/raw_convert.cc b/src/raw_convert.cc index 281772e7..35a57a52 100644 --- a/src/raw_convert.cc +++ b/src/raw_convert.cc @@ -38,13 +38,15 @@ using std::string; using std::wstring; +/** @param v Numeric value as an ASCII string */ static string make_raw (string v) { struct lconv* lc = localeconv (); - boost::algorithm::replace_all (v, lc->decimal_point, "."); + /* thousands_sep may be . so remove them before changing decimal points */ boost::algorithm::replace_all (v, lc->thousands_sep, ""); + boost::algorithm::replace_all (v, lc->decimal_point, "."); return v; } -- cgit v1.2.3