Clipboard null termination

Aric Stewart aric at codeweavers.com
Mon Feb 19 15:29:02 CST 2001


We need to give room for the null termination when translating the
clipboard text.

-aric
-------------- next part --------------
Index: windows/clipboard.c
===================================================================
RCS file: /home/wine/wine/windows/clipboard.c,v
retrieving revision 1.35
diff -u -u -r1.35 clipboard.c
--- windows/clipboard.c	2001/02/12 19:16:05	1.35
+++ windows/clipboard.c	2001/02/19 20:53:05
@@ -617,6 +617,9 @@
 	else
 	    src_chars = strlen(lpstrS);
 
+   /* Make room for NULL termination */ 
+    src_chars++;
+
 	/* Calculate number of characters in the destination buffer */
 	dst_chars = CLIPBOARD_ConvertText(lpSource->wFormatID, lpstrS, src_chars,
 				     lpTarget->wFormatID, NULL, 0);


More information about the wine-patches mailing list