You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found that convertFromString() in basic_types.cpp sometimes sets an incorrect locale after converting the string to a double. The old_locale string starts out getting the value "C", which in my case is correct. However, after the next call to setlocale(), which sets it to "C" (ie. the same locale) the old_locale string is garbage.
Changing old_locale to "std::string" instead of "const auto", ie. making a local copy, fixes the error. This is tested on windows with both MSVC 2015 and 2019.
The text was updated successfully, but these errors were encountered:
I have found that convertFromString() in basic_types.cpp sometimes sets an incorrect locale after converting the string to a double. The old_locale string starts out getting the value "C", which in my case is correct. However, after the next call to setlocale(), which sets it to "C" (ie. the same locale) the old_locale string is garbage.
Changing old_locale to "std::string" instead of "const auto", ie. making a local copy, fixes the error. This is tested on windows with both MSVC 2015 and 2019.
The text was updated successfully, but these errors were encountered: