diff --git a/ChangeLog b/ChangeLog index f8e5e4b5a2..67b2318dd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-08 Tor Lillqvist + + * gtk/gtkmain.c (do_pre_parse_initialization): Small fix to the + code committed earlier today. + 2006-10-08 Matthias Clasen * gtk/gtkradiobutton.c (gtk_radio_button_focus): Don't diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 81b0833cd2..8168e573b6 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -531,6 +531,7 @@ do_pre_parse_initialization (int *argc, if (p != NULL) { + p = g_strdup (p); if (strcmp (p, "C") == 0) SetThreadLocale (LOCALE_SYSTEM_DEFAULT); else @@ -538,7 +539,7 @@ do_pre_parse_initialization (int *argc, /* Check if one of the supported locales match the * environment variable. If so, use that locale. */ - iso639_to_check = g_strdup (p); + iso639_to_check = p; iso3166_to_check = strchr (iso639_to_check, '_'); if (iso3166_to_check != NULL) { @@ -566,12 +567,13 @@ do_pre_parse_initialization (int *argc, if (script_to_check != NULL) *script_to_check++ = '\0'; /* LANG_SERBIAN == LANG_CROATIAN, recognize just "sr" */ - if (strcmp (iso639_to_check, "sr")) + if (strcmp (iso639_to_check, "sr") == 0) iso3166_to_check = "SP"; } EnumSystemLocales (enum_locale_proc, LCID_SUPPORTED); } + g_free (p); } if (!setlocale_called) setlocale (LC_ALL, "");