imm32: dwIndex flags are mutually exclusive.
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index f085080..6f97448 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -2130,6 +2130,13 @@
if (!data)
return FALSE;
+ if (!(dwIndex == SCS_SETSTR ||
+ dwIndex == SCS_CHANGEATTR ||
+ dwIndex == SCS_CHANGECLAUSE ||
+ dwIndex == SCS_SETRECONVERTSTRING ||
+ dwIndex == SCS_QUERYRECONVERTSTRING))
+ return FALSE;
+
if (!is_himc_ime_unicode(data))
return data->immKbd->pImeSetCompositionString(hIMC, dwIndex, lpComp,
dwCompLen, lpRead, dwReadLen);
@@ -2178,6 +2185,13 @@
if (!data)
return FALSE;
+ if (!(dwIndex == SCS_SETSTR ||
+ dwIndex == SCS_CHANGEATTR ||
+ dwIndex == SCS_CHANGECLAUSE ||
+ dwIndex == SCS_SETRECONVERTSTRING ||
+ dwIndex == SCS_QUERYRECONVERTSTRING))
+ return FALSE;
+
if (is_himc_ime_unicode(data))
return data->immKbd->pImeSetCompositionString(hIMC, dwIndex, lpComp,
dwCompLen, lpRead, dwReadLen);
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index 97a7201..7b76226 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -274,22 +274,18 @@
ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR,
NULL, 0, NULL, 0);
- todo_wine
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGECLAUSE,
NULL, 0, NULL, 0);
- todo_wine
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
ret = ImmSetCompositionStringW(imc, SCS_CHANGEATTR | SCS_CHANGECLAUSE,
NULL, 0, NULL, 0);
- todo_wine
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR | SCS_CHANGECLAUSE,
NULL, 0, NULL, 0);
- todo_wine
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
ImmReleaseContext(hwnd, imc);