From db8fb6f3870a0bfc5eb8c564451074253286b278 Mon Sep 17 00:00:00 2001 From: Gerard Patel Date: Wed, 10 Jan 2001 23:54:46 +0000 Subject: [PATCH] Fixed returned length for LB_GETTEXT. --- controls/listbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls/listbox.c b/controls/listbox.c index 3e4d442c88f..24920d791db 100644 --- a/controls/listbox.c +++ b/controls/listbox.c @@ -762,7 +762,7 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPARAM lParam, BOOL else { LPSTR buffer = (LPSTR)lParam; - return WideCharToMultiByte(CP_ACP, 0, descr->items[index].str, -1, buffer, 0x7FFFFFFF, NULL, NULL); + return WideCharToMultiByte(CP_ACP, 0, descr->items[index].str, -1, buffer, 0x7FFFFFFF, NULL, NULL) - 1; } } else { if (lParam)