Skip to content

Commit

Permalink
fix(moneymanagerex#3587): test locale before use
Browse files Browse the repository at this point in the history
  • Loading branch information
vomikan committed Jun 10, 2021
1 parent bea34ea commit cf91640
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/model/Model_Currency.cpp
Expand Up @@ -182,13 +182,14 @@ const wxString Model_Currency::toString(double value, const Data* currency, int

static wxString use_locale;
if (use_locale.empty()) {
use_locale = locale.empty() ? "N" : "Y";
if (use_locale == "Y")
try {
fmt::format(std::locale(locale.c_str()), "{:L}", 123);
}
catch (...) {
locale = "";
}
use_locale = locale.empty() ? "N" : "Y";
}

if (decimal.empty()) {
Expand Down

0 comments on commit cf91640

Please sign in to comment.