Fixed crash bug regarding locale detection on 64bit windows build.
This commit is contained in:
parent
af1bd0850e
commit
4e7346c8d9
1 changed files with 1 additions and 6 deletions
|
|
@ -965,7 +965,7 @@ static void set_langint_from_locale_string(const char *restrict loc)
|
||||||
*/
|
*/
|
||||||
static void mysetenv(const char *name, const char *value)
|
static void mysetenv(const char *name, const char *value)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SETENV
|
#ifndef HAVE_SETENV
|
||||||
int len;
|
int len;
|
||||||
char *str;
|
char *str;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1077,14 +1077,9 @@ static int set_current_language(const char *restrict loc, int * ptr_num_wished_l
|
||||||
#endif
|
#endif
|
||||||
textdomain("tuxpaint");
|
textdomain("tuxpaint");
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
if (!*loc)
|
|
||||||
loc = _nl_locale_name(LC_MESSAGES, "");
|
|
||||||
#else
|
|
||||||
// NULL: Used to direct setlocale() to query the current
|
// NULL: Used to direct setlocale() to query the current
|
||||||
// internationalised environment and return the name of the locale().
|
// internationalised environment and return the name of the locale().
|
||||||
loc = setlocale(LC_MESSAGES, NULL);
|
loc = setlocale(LC_MESSAGES, NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (strcmp(oldloc, "") != 0 && strcmp(loc, oldloc) != 0)
|
if (strcmp(oldloc, "") != 0 && strcmp(loc, oldloc) != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue