We need to give room for the null termination when translating the

clipboard text.
This commit is contained in:
Aric Stewart 2001-02-20 01:54:08 +00:00 committed by Alexandre Julliard
parent 45e6f62457
commit 096c1ae4ec
1 changed files with 2 additions and 2 deletions

View File

@ -613,9 +613,9 @@ static LPWINE_CLIPFORMAT CLIPBOARD_RenderText( UINT wFormat )
/* Text always NULL terminated */
if(lpSource->wFormatID == CF_UNICODETEXT)
src_chars = strlenW((LPCWSTR)lpstrS);
src_chars = strlenW((LPCWSTR)lpstrS)+1;
else
src_chars = strlen(lpstrS);
src_chars = strlen(lpstrS)+1;
/* Calculate number of characters in the destination buffer */
dst_chars = CLIPBOARD_ConvertText(lpSource->wFormatID, lpstrS, src_chars,