From af4c6d82d1e4dfa9aa60aeabed408486a3979a3e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 May 2021 15:57:57 +0300 Subject: fix for C++ runtime locale settings --- .../CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/CurrencyRates') diff --git a/protocols/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp b/protocols/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp index 9b1bfdc31a..db6d2104aa 100644 --- a/protocols/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp +++ b/protocols/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp @@ -19,12 +19,12 @@ CMStringW build_url(MCONTACT hContact, const CMStringW &rsURL) bool parse_response(const CMStringW &rsJSON, double &dRate) { - setlocale(LC_NUMERIC, "en_US"); JSONNode root = JSONNode::parse(_T2A(rsJSON)); if (!root) return false; - return 1 == swscanf(root.at(json_index_t(0)).as_mstring(), L"%lf", &dRate); + dRate = root.at(json_index_t(0)).as_float(); + return true; } using TWatchedRates = std::vector; -- cgit v1.2.3