Fix edit control's WM_GETTEXT behaviour.

This commit is contained in:
Ove Kaaven 2000-04-23 19:59:11 +00:00 committed by Alexandre Julliard
parent a7adda8280
commit b4018e7a57
1 changed files with 2 additions and 7 deletions

View File

@ -3157,13 +3157,8 @@ static LRESULT EDIT_WM_EraseBkGnd(WND *wnd, EDITSTATE *es, HDC dc)
*/
static INT EDIT_WM_GetText(WND *wnd, EDITSTATE *es, INT count, LPSTR text)
{
INT len = lstrlenA(es->text);
if (count > len) {
lstrcpyA(text, es->text);
return len;
} else
return -1;
lstrcpynA(text, es->text, count);
return strlen(text);
}