comctl32: header: Ignore out-of-range iOrder in SetItemT.

This commit is contained in:
Mikołaj Zalewski 2006-05-30 14:17:06 +02:00 committed by Alexandre Julliard
parent 2c86775d91
commit 414128eb94
1 changed files with 2 additions and 2 deletions

View File

@ -1460,9 +1460,9 @@ HEADER_SetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode)
lpItem = &infoPtr->items[nItem]; lpItem = &infoPtr->items[nItem];
HEADER_StoreHDItemInHeader(lpItem, phdi->mask, phdi, bUnicode); HEADER_StoreHDItemInHeader(lpItem, phdi->mask, phdi, bUnicode);
/* FIXME: check it order is not out of bound */
if (phdi->mask & HDI_ORDER) if (phdi->mask & HDI_ORDER)
HEADER_ChangeItemOrder(infoPtr, nItem, phdi->iOrder); if (phdi->iOrder >= 0 && phdi->iOrder < infoPtr->uNumItem)
HEADER_ChangeItemOrder(infoPtr, nItem, phdi->iOrder);
HEADER_SendHeaderNotifyT (hwnd, HDN_ITEMCHANGEDW, nItem, phdi->mask, &hdNotify); HEADER_SendHeaderNotifyT (hwnd, HDN_ITEMCHANGEDW, nItem, phdi->mask, &hdNotify);