From c9edb6f40bfd5b16db1a690d2014854ddc6d8408 Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Tue, 3 Feb 2009 12:11:07 +0000 Subject: [PATCH] fixed recursive call to GetGUILanguage in error case --- localization.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/localization.c b/localization.c index 8e5013c..ba90dcb 100755 --- a/localization.c +++ b/localization.c @@ -68,10 +68,9 @@ GetGUILanguage(void) DWORD value = 0; LONG status = RegOpenKeyEx(HKEY_CURRENT_USER, GUI_REGKEY_HKCU, 0, KEY_READ, ®key); - 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()) ); }