Skip to content

Commit

Permalink
Merge pull request #5933 from n-stein/fix(#5852)
Browse files Browse the repository at this point in the history
fix(#5852): crash fix
  • Loading branch information
vomikan committed May 22, 2023
2 parents 158a936 + 0eb31b9 commit 6a72590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/Model_Currency.cpp
Expand Up @@ -256,7 +256,7 @@ const wxString Model_Currency::toString(double value, const Data* currency, int
if (d.empty())
{
try {
fmt::format(std::locale("en_US.UTF-8"), "{:L}", 123);
fmt::format(std::locale("en_US"), "{:L}", 123);
d = "Y";
}
catch (...) {
Expand All @@ -268,7 +268,7 @@ const wxString Model_Currency::toString(double value, const Data* currency, int
precision = log10(currency ? currency->SCALE : GetBaseCurrency()->SCALE);
}

auto l = (s_use_locale == "Y" ? std::locale(s_locale.c_str()) : (d == "Y" ? std::locale("en_US.UTF-8") : std::locale()));
auto l = (s_use_locale == "Y" ? std::locale(s_locale.c_str()) : (d == "Y" ? std::locale("en_US") : std::locale()));
std::string s;
value += LIMIT; //to ignore the negative sign on values of zero #564

Expand Down

0 comments on commit 6a72590

Please sign in to comment.