summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2019-06-23 18:11:34 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2019-06-23 18:11:34 +0100
commit210c90b328cf8f1810999e1e70752ff81ab6308e (patch)
tree95cf6a68b131df6b4409771042aee82a8512396d
parent3f73ae1e3a081bf316ab729afc5ddbb62247982e (diff)
hw/xwin: Fix length of text property set by SelectionRequestsnapshot
Fix the length of text property set by a SelectionRequest The length of the text property is not neccessarily the same as the length of the clipboard text before it is d2u converted (specifically, if that contains any '\r\n' sequences, it will be shorter as they are now just '\n')
-rw-r--r--hw/xwin/winclipboard/xevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xwin/winclipboard/xevents.c b/hw/xwin/winclipboard/xevents.c
index af956679b..a94359ce3 100644
--- a/hw/xwin/winclipboard/xevents.c
+++ b/hw/xwin/winclipboard/xevents.c
@@ -560,7 +560,7 @@ winClipboardFlushXEvents(HWND hwnd,
winClipboardDOStoUNIX(pszConvertData, strlen(pszConvertData));
xtpText_value = strdup(pszConvertData);
- xtpText_nitems = iConvertDataLen - 1;
+ xtpText_nitems = strlen(pszConvertData);
/* data will fit into a single X request? (INCR not yet supported) */
{