diff options
author | Matt Wilson <msw@redhat.com> | 1999-10-22 03:08:37 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-10-22 03:08:37 +0000 |
commit | 36f27febaf73fb1ba2e750d1352116cc1e9d3720 (patch) | |
tree | 29b1ec93c1cefc1706e2a060f81570426d7f8df8 /loader/lang.c | |
parent | e4a342dd54e9ee9add975a94b5f8d4ed182663b2 (diff) | |
download | anaconda-36f27febaf73fb1ba2e750d1352116cc1e9d3720.tar.gz anaconda-36f27febaf73fb1ba2e750d1352116cc1e9d3720.tar.xz anaconda-36f27febaf73fb1ba2e750d1352116cc1e9d3720.zip |
free the strings right before we load a new set - not before we prompt
Diffstat (limited to 'loader/lang.c')
-rw-r--r-- | loader/lang.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/loader/lang.c b/loader/lang.c index cae004a11..a1c005e78 100644 --- a/loader/lang.c +++ b/loader/lang.c @@ -223,7 +223,7 @@ static int loadFont(char * fontFile, int flags) { void setLanguage (char * key) { int i; - + for (i = 0; i < numLanguages; i++) { if (!strcmp(languages[i].key, key)) { setenv("LANG", languages[i].key, 1); @@ -243,11 +243,6 @@ int chooseLanguage(char ** lang, int flags) { int i; int english = 0; - if (strings) { - free(strings), strings = NULL; - numStrings = allocedStrings = 0; - } - langs = alloca(sizeof(*langs) * (numLanguages + 1)); for (i = 0; i < numLanguages; i++) { @@ -283,6 +278,12 @@ int chooseLanguage(char ** lang, int flags) { setenv("LANG", languages[choice].key, 1); setenv("LC_ALL", languages[choice].lc_all, 1); setenv("LINGUAS", languages[choice].key, 1); + + if (strings) { + free(strings), strings = NULL; + numStrings = allocedStrings = 0; + } + loadLanguage (NULL, flags); if (languages[choice].font) loadFont(languages[choice].font, flags); |