Fixed #4995: Don't forget to send the NULL of the clipboard string.

This commit is contained in:
Armin Novak 2018-11-12 08:35:04 +01:00
parent c5c1bac31a
commit 738aa56233

View File

@ -769,7 +769,8 @@ DWORD fixKeyCode(DWORD keyCode, unichar keyChar, enum APPLE_KEYBOARD_TYPE type)
formatId = ClipboardRegisterFormat(mfc->clipboard, "UTF8_STRING");
size = (UINT32) [formatData length];
data = [formatData bytes];
ClipboardSetData(mfc->clipboard, formatId, data, size);
/* size is the string length without the terminating NULL terminator */
ClipboardSetData(mfc->clipboard, formatId, data, size + 1);
formatMatch = TRUE;
break;
}