richedit: Fix unicode truncation on EM_GETLINE message

Dylan Smith dylan.ah.smith at gmail.com
Fri Jan 2 12:56:49 CST 2009


On EM_GETLINE the number of characters to copy was being passed into
lstrcpyn for unicode strings, however lstrcpyn always makes sure the
string is null terminated.  This caused a NULL character to replace the
last character in the run, which caused a bug in the application I was
trying to fix (Bug 16349).

I simply used memcpy instead of lstrcpyn so that no NULL terminating
character is inserted unless there is extra space in the buffer.
---
 dlls/riched20/editor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Fix-unicode-truncation-on-EM_GETLINE.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20090102/95195c97/attachment.txt 


More information about the wine-patches mailing list