diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-10-17 14:37:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-10-17 14:37:01 +0100 |
| commit | d78d3a6c156bc159a6726f89f1bdfc274800a14f (patch) | |
| tree | 00947fae28581f4a0f4b7e9c369678a7831c7c1c /src | |
| parent | c4d06c36ffc25273d3f35449a415b2b813d47a27 (diff) | |
Fix make_raw() failure when thousands_sep is a period (.)
Diffstat (limited to 'src')
| -rw-r--r-- | src/raw_convert.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |
