Skip to content

Commit

Permalink
fixed recursive call to GetGUILanguage in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
d12fk committed Feb 3, 2009
1 parent 6f37fd9 commit c9edb6f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions localization.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) );
}

Expand Down

0 comments on commit c9edb6f

Please sign in to comment.