mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
Use the supplied buffer when copying item text.
This commit is contained in:
parent
d44b4280cb
commit
1282ef9420
1 changed files with 12 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue