diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-20 15:57:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-20 15:57:57 +0300 |
commit | af4c6d82d1e4dfa9aa60aeabed408486a3979a3e (patch) | |
tree | 753da979b8c9ac1c63c330eb8883b5b5b89360d3 /protocols/CurrencyRates/src | |
parent | 5d0121f526c8dde41fb87c15a1e2556c8bcb62ba (diff) |
fix for C++ runtime locale settings
Diffstat (limited to 'protocols/CurrencyRates/src')
-rw-r--r-- | protocols/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<CCurrencyRatesProviderCurrencyConverter::TRateInfo>; |