Merge pull request #4270 from akallabeth/mac_clipboard_fix

Fixed #1536: Clipboard data size.
This commit is contained in:
Bernhard Miklautz 2017-11-27 10:40:44 +01:00 committed by GitHub
commit cd0b055008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -772,8 +772,7 @@ DWORD fixKeyCode(DWORD keyCode, unichar keyChar, enum APPLE_KEYBOARD_TYPE type)
{
formatData = [item dataForType:type];
formatId = ClipboardRegisterFormat(mfc->clipboard, "UTF8_STRING");
/* length does not include null terminator */
size = (UINT32) [formatData length] + 1;
size = (UINT32) [formatData length];
data = [formatData bytes];
ClipboardSetData(mfc->clipboard, formatId, data, size);
formatMatch = TRUE;