fixed recursive call to GetGUILanguage in error case

pull/1/head
Heiko Hund 2009-02-03 12:11:07 +00:00
parent 6f37fd999f
commit c9edb6f40b
1 changed files with 2 additions and 3 deletions

View File

@ -68,10 +68,9 @@ GetGUILanguage(void)
DWORD value = 0;
LONG status = RegOpenKeyEx(HKEY_CURRENT_USER, GUI_REGKEY_HKCU, 0, KEY_READ, &regkey);
if (status != ERROR_SUCCESS)
ShowLocalizedMsg(GUI_NAME, ERR_CREATE_REG_HKCU_KEY, GUI_REGKEY_HKCU);
if (status == ERROR_SUCCESS)
GetRegistryValueNumeric(regkey, "ui_language", &value);
GetRegistryValueNumeric(regkey, "ui_language", &value);
gui_language = ( value != 0 ? value : LANGIDFROMLCID(GetThreadLocale()) );
}