Jeff Zaroyko : imm32: dwIndex flags are mutually exclusive.

Alexandre Julliard julliard at winehq.org
Fri Oct 2 11:02:20 CDT 2009


Module: wine
Branch: master
Commit: 4ae16e37eec8e7398ffc2b68170b5dfffd80b369
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4ae16e37eec8e7398ffc2b68170b5dfffd80b369

Author: Jeff Zaroyko <jeffz at jeffz.name>
Date:   Fri Oct  2 12:51:49 2009 +1000

imm32: dwIndex flags are mutually exclusive.

---

 dlls/imm32/imm.c         |   14 ++++++++++++++
 dlls/imm32/tests/imm32.c |    4 ----
 2 files changed, 14 insertions(+), 4 deletions(-)

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 @@ 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);
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 @@ 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);




More information about the wine-cvs mailing list