Use the supplied buffer when copying item text.
This commit is contained in:
parent
d44b4280cb
commit
1282ef9420
|
@ -329,9 +329,19 @@ static void
|
|||
COMBOEX_CopyItem (COMBOEX_INFO *infoPtr, CBE_ITEMDATA *item, COMBOBOXEXITEMW *cit)
|
||||
{
|
||||
if (cit->mask & CBEIF_TEXT) {
|
||||
/*
|
||||
* 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;
|
||||
if (cit->mask & CBEIF_SELECTEDIMAGE)
|
||||
|
|
Loading…
Reference in New Issue