comctl32: Fix an Nx1 in ImageList_DrawIndirect().

This commit is contained in:
Mike McCormack 2006-11-05 17:11:34 +09:00 committed by Alexandre Julliard
parent 4e5f56a8e0
commit ba73cac961

View File

@ -1224,10 +1224,12 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
if ( (nOvlIdx >= 1) && (nOvlIdx <= MAX_OVERLAYIMAGE)) { if ( (nOvlIdx >= 1) && (nOvlIdx <= MAX_OVERLAYIMAGE)) {
nOvlIdx = himl->nOvlIdx[nOvlIdx - 1]; nOvlIdx = himl->nOvlIdx[nOvlIdx - 1];
if ((nOvlIdx >= 0) && (nOvlIdx < himl->cCurImage)) { if ((nOvlIdx >= 0) && (nOvlIdx < himl->cCurImage)) {
const INT ox = himl->cx * nOvlIdx + pimldp->xBitmap; POINT ptOvl;
imagelist_point_from_index( himl, nOvlIdx, &ptOvl );
ptOvl.x += pimldp->xBitmap;
if (himl->hbmMask && !(fStyle & ILD_IMAGE)) if (himl->hbmMask && !(fStyle & ILD_IMAGE))
BitBlt (hImageDC, 0, 0, cx, cy, hMaskListDC, ox, pt.x, SRCAND); BitBlt (hImageDC, 0, 0, cx, cy, hMaskListDC, ptOvl.x, ptOvl.y, SRCAND);
BitBlt (hImageDC, 0, 0, cx, cy, hImageListDC, ox, pt.y, SRCPAINT); BitBlt (hImageDC, 0, 0, cx, cy, hImageListDC, ptOvl.x, ptOvl.y, SRCPAINT);
} }
} }