Commit 4ae16e37 authored by Jeff Zaroyko's avatar Jeff Zaroyko Committed by Alexandre Julliard

imm32: dwIndex flags are mutually exclusive.

parent 5d530fee
......@@ -2130,6 +2130,13 @@ BOOL WINAPI ImmSetCompositionStringA(
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 @@ BOOL WINAPI ImmSetCompositionStringW(
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);
......
......@@ -274,22 +274,18 @@ static void test_ImmSetCompositionString(void)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment