Module: wine Branch: master Commit: 0f2f72d7b9bb198a4f14c37c1b017a81b6935790 URL: https://source.winehq.org/git/wine.git/?a=commit;h=0f2f72d7b9bb198a4f14c37c1...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Mar 7 11:23:37 2019 +0300
imm32: Fix output buffer length handling for A -> W conversion case of GCS_COMPSTR.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Aric Stewart aric@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 a385d88..948ef78 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;