Fix the return value of WM_GETTEXT in the edit control.

This commit is contained in:
Dmitry Timoshkov 2001-01-11 20:17:21 +00:00 committed by Alexandre Julliard
parent 376beadaaa
commit 785203ced8
1 changed files with 2 additions and 2 deletions

View File

@ -3709,9 +3709,9 @@ static INT EDIT_WM_GetText(EDITSTATE *es, INT count, LPARAM lParam, BOOL unicode
else
{
LPSTR textA = (LPSTR)lParam;
INT ret = WideCharToMultiByte(CP_ACP, 0, es->text, -1, textA, count, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, es->text, -1, textA, count, NULL, NULL);
textA[count - 1] = 0; /* ensure 0 termination */
return ret;
return strlen(textA);
}
}