Use the supplied buffer when copying item text.

This commit is contained in:
Aric Stewart 2002-02-08 17:10:49 +00:00 committed by Alexandre Julliard
parent d44b4280cb
commit 1282ef9420
1 changed files with 12 additions and 2 deletions

View File

@ -329,8 +329,18 @@ static void
COMBOEX_CopyItem (COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
{
if (cit->mask & CBEIF_TEXT) {
cit->pszText = item->pszText;
cit->cchTextMax = item->cchTextMax;
/*
* when given a text buffer actually use that buffer
*/
if (cit->pszText)
{
lstrcpynW(cit->pszText,item->pszText,cit->cchTextMax);
}
else
{
cit->pszText = item->pszText;
cit->cchTextMax = item->cchTextMax;
}
}
if (cit->mask & CBEIF_IMAGE)
cit->iImage = item->iImage;