Fix edit control's WM_GETTEXT behaviour.
This commit is contained in:
parent
a7adda8280
commit
b4018e7a57
|
@ -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)
|
static INT EDIT_WM_GetText(WND *wnd, EDITSTATE *es, INT count, LPSTR text)
|
||||||
{
|
{
|
||||||
INT len = lstrlenA(es->text);
|
lstrcpynA(text, es->text, count);
|
||||||
|
return strlen(text);
|
||||||
if (count > len) {
|
|
||||||
lstrcpyA(text, es->text);
|
|
||||||
return len;
|
|
||||||
} else
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue