Commit 7a543060 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Fix unicode truncation on EM_GETLINE message.

parent 91421f0f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment