Commit 1282ef94 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Use the supplied buffer when copying item text.

parent d44b4280
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment