comctl32: Don't use uninitialized LVITEM fields in LISTVIEW_InsertItemT when LVS_EX_CHECKBOXES was specified.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
This commit is contained in:
parent
c565145b0e
commit
9c87c7e76d
|
@ -7851,10 +7851,18 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
|
|||
item.iItem = nItem;
|
||||
if (infoPtr->dwLvExStyle & LVS_EX_CHECKBOXES)
|
||||
{
|
||||
item.mask |= LVIF_STATE;
|
||||
item.stateMask |= LVIS_STATEIMAGEMASK;
|
||||
item.state &= ~LVIS_STATEIMAGEMASK;
|
||||
item.state |= INDEXTOSTATEIMAGEMASK(1);
|
||||
if (item.mask & LVIF_STATE)
|
||||
{
|
||||
item.stateMask |= LVIS_STATEIMAGEMASK;
|
||||
item.state &= ~LVIS_STATEIMAGEMASK;
|
||||
item.state |= INDEXTOSTATEIMAGEMASK(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.mask |= LVIF_STATE;
|
||||
item.stateMask = LVIS_STATEIMAGEMASK;
|
||||
item.state = INDEXTOSTATEIMAGEMASK(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!set_main_item(infoPtr, &item, TRUE, isW, &has_changed)) goto undo;
|
||||
|
|
Loading…
Reference in New Issue