[PATCH 3/3] imm32: Fix output buffer length handling for A -> W conversion case of GCS_COMPSTR.

Nikolay Sivov nsivov at codeweavers.com
Thu Mar 7 02:23:37 CST 2019


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/imm32/imm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index a385d884cb..948ef780f6 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -1217,7 +1217,7 @@ static INT CopyCompStringIMEtoClient(const InputContextData *data, const void *s
     if (is_himc_ime_unicode(data) ^ unicode)
     {
         if (unicode)
-            ret = MultiByteToWideChar(CP_ACP, 0, src, src_len, dst, dst_len);
+            ret = MultiByteToWideChar(CP_ACP, 0, src, src_len, dst, dst_len / sizeof(WCHAR));
         else
             ret = WideCharToMultiByte(CP_ACP, 0, src, src_len, dst, dst_len, NULL, NULL);
         ret *= char_size;
-- 
2.20.1




More information about the wine-devel mailing list