[USER32] Follow-up of 2ba41ad

Be careful about every case.
CORE-18338
This commit is contained in:
Katayama Hirofumi MZ 2022-08-28 16:17:58 +09:00
parent 2ba41ad4e0
commit 8edc22a2ca

View File

@ -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 */