https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8edc22a2ca81af088843af3aad5ffe8be3dbf134

commit 8edc22a2ca81af088843af3aad5ffe8be3dbf134
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Sun Aug 28 16:17:58 2022 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Sun Aug 28 16:17:58 2022 +0900

    [USER32] Follow-up of 2ba41ad
    
    Be careful about every case.
    CORE-18338
---
 win32ss/user/user32/windows/input.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/win32ss/user/user32/windows/input.c 
b/win32ss/user/user32/windows/input.c
index 97f84bb0d59..64fa97deffd 100644
--- a/win32ss/user/user32/windows/input.c
+++ b/win32ss/user/user32/windows/input.c
@@ -704,12 +704,17 @@ IntLoadKeyboardLayout(
                 dwhkl |= (0xf000 | wcstol(wszLayoutId, NULL, 16)) << 16;
         }
 
-        /* Check "IME File" value */
-        dwSize = sizeof(szImeFileName);
-        if (RegQueryValueExW(hKey, L"IME File", NULL, &dwType, 
(LPBYTE)szImeFileName,
-                             &dwSize) != ERROR_SUCCESS)
+        if (bIsIME)
         {
-            dwhkl = LOWORD(dwhkl);
+            /* Check "IME File" value */
+            dwSize = sizeof(szImeFileName);
+            if (RegQueryValueExW(hKey, L"IME File", NULL, &dwType, 
(LPBYTE)szImeFileName,
+                                 &dwSize) != ERROR_SUCCESS)
+            {
+                FIXME("Check IME file existence in system32\n")
+                bIsIME = FALSE;
+                dwhkl = LOWORD(dwhkl);
+            }
         }
 
         /* Close the key now */

Reply via email to