x11drv: Fix AlphaBlend read boundaries.

This commit is contained in:
Maarten Lankhorst 2006-01-30 14:57:08 +01:00 committed by Alexandre Julliard
parent 43b27144f0
commit 0cbf8062a1
1 changed files with 3 additions and 3 deletions

View File

@ -1554,14 +1554,14 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst,
top_down = TRUE;
dstbits += widthSrc * (heightSrc - 1) * 4;
y2 = ySrc;
y = y2 + heightSrc;
y = y2 + heightSrc - 1;
}
else
{
y = dib.dsBmih.biHeight - ySrc - 1;
y2 = y - heightSrc;
y2 = y - heightSrc + 1;
}
for(; y > y2; y--) {
for(; y >= y2; y--) {
memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4,
widthSrc * 4);
dstbits += (top_down ? -1 : 1) * widthSrc * 4;