From e833248d58207b265d8f87d8b01b1b00c49fd228 Mon Sep 17 00:00:00 2001 From: Carl Sopchak Date: Fri, 19 Jul 2002 03:13:10 +0000 Subject: [PATCH] Return empty string on error in WM_GETTEXT. --- controls/combo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/controls/combo.c b/controls/combo.c index e92a2a70c14..5d9653c2388 100644 --- a/controls/combo.c +++ b/controls/combo.c @@ -1603,6 +1603,15 @@ static LRESULT COMBO_GetText( LPHEADCOMBO lphc, INT N, LPARAM lParam, BOOL unico return (LRESULT)n; } } + /* LB_GETCURSEL returned LB_ERR - truncate string, return zero */ + if (unicode) + { + LPWSTR lpText = (LPWSTR)lParam; + lpText[0] = '\0'; + } else { + LPSTR lpText = (LPSTR)lParam; + lpText[0] = '\0'; + } return 0; } -- 2.11.4.GIT