From 4e7346c8d955592fc8f6f3a23163ab249eb8240c Mon Sep 17 00:00:00 2001 From: dolphin6k Date: Tue, 26 Oct 2021 23:16:04 +0900 Subject: [PATCH] Fixed crash bug regarding locale detection on 64bit windows build. --- src/i18n.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/i18n.c b/src/i18n.c index 25b5db983..f1c7b5547 100644 --- a/src/i18n.c +++ b/src/i18n.c @@ -965,7 +965,7 @@ static void set_langint_from_locale_string(const char *restrict loc) */ static void mysetenv(const char *name, const char *value) { -#ifdef HAVE_SETENV +#ifndef HAVE_SETENV int len; char *str; #endif @@ -1077,14 +1077,9 @@ static int set_current_language(const char *restrict loc, int * ptr_num_wished_l #endif textdomain("tuxpaint"); -#ifdef _WIN32 - if (!*loc) - loc = _nl_locale_name(LC_MESSAGES, ""); -#else // NULL: Used to direct setlocale() to query the current // internationalised environment and return the name of the locale(). loc = setlocale(LC_MESSAGES, NULL); -#endif if (strcmp(oldloc, "") != 0 && strcmp(loc, oldloc) != 0) {