Dylan Smith : richedit: Fix unicode truncation on EM_GETLINE message.
Module: wine Branch: master Commit: 7a5430600879281b43a59b36bf5dd9ad8bc440f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7a5430600879281b43a59b36bf... Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Fri Jan 2 13:56:49 2009 -0500 richedit: Fix unicode truncation on EM_GETLINE message. --- dlls/riched20/editor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index b5a69f7..1f7c7db 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3558,7 +3558,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, nCopy = min(nCharsLeft, strText->nLen); if (unicode) - lstrcpynW((LPWSTR) dest, strText->szData, nCopy); + memcpy(dest, strText->szData, nCopy * sizeof(WCHAR)); else nCopy = WideCharToMultiByte(CP_ACP, 0, strText->szData, nCopy, dest, nCharsLeft, NULL, NULL);
participants (1)
-
Alexandre Julliard