Dylan Smith : richedit: Fix unicode truncation on EM_GETLINE message.

Alexandre Julliard julliard at winehq.org
Sat Jan 3 09:11:19 CST 2009


Module: wine
Branch: master
Commit: 7a5430600879281b43a59b36bf5dd9ad8bc440f6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7a5430600879281b43a59b36bf5dd9ad8bc440f6

Author: Dylan Smith <dylan.ah.smith at 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);




More information about the wine-cvs mailing list