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>
stable
Nikolay Sivov 2019-03-07 11:23:37 +03:00 committed by Alexandre Julliard
parent fd7cda93a3
commit 0f2f72d7b9
1 changed files with 1 additions and 1 deletions

View File

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