From 785203ced8bdd3abad04ca7e0b0a4fab0aa5c949 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 11 Jan 2001 20:17:21 +0000 Subject: [PATCH] Fix the return value of WM_GETTEXT in the edit control. --- controls/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controls/edit.c b/controls/edit.c index b0d6077cc94..491b317ef68 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -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); } } -- 2.11.4.GIT