richedit: Fix unicode truncation on EM_GETLINE message.

This commit is contained in:
Dylan Smith 2009-01-02 13:56:49 -05:00 committed by Alexandre Julliard
parent 91421f0f02
commit 7a54306008

View File

@ -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);