Commit 916a7487 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winemac: Don't use MultiByteToWideChar in macdrv_GetKeyNameText.

Also fixes null termination tests in test_key_names. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com>
parent f35ecdf7
......@@ -1257,8 +1257,9 @@ INT macdrv_GetKeyNameText(LONG lparam, LPWSTR buffer, INT size)
{
if (vkey_names[i].vkey == vkey)
{
len = MultiByteToWideChar(CP_UTF8, 0, vkey_names[i].name, -1, buffer, size);
if (len) len--;
len = min(strlen(vkey_names[i].name) + 1, size);
ascii_to_unicode(buffer, vkey_names[i].name, len);
if (len) buffer[--len] = 0;
break;
}
}
......
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