From fe2cbf37357057197173220ca6e286cd44cc875e Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 4 Apr 2009 18:24:24 +0000 Subject: [PATCH] Evgeniy Boltik - Fix copypaste mistake in EngStretchBltROP. - Fix check in EngStretchBltROP, it should check original InputRect, not the clipped one. - Fix improper variable type in DIB_XXBPP_StretchBlt: PatternX and PatternY could be negative. See issue #4336 for more details. svn path=/trunk/; revision=40362 --- reactos/subsystems/win32/win32k/dib/dibXXbpp.c | 2 +- reactos/subsystems/win32/win32k/eng/bitblt.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/subsystems/win32/win32k/dib/dibXXbpp.c b/reactos/subsystems/win32/win32k/dib/dibXXbpp.c index d615bbde46a..2abc9fdfc95 100644 --- a/reactos/subsystems/win32/win32k/dib/dibXXbpp.c +++ b/reactos/subsystems/win32/win32k/dib/dibXXbpp.c @@ -50,7 +50,7 @@ BOOLEAN DIB_XXBPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFOBJ *Ma PFN_DIB_GetPixel fnPattern_GetPixel = NULL; PFN_DIB_GetPixel fnMask_GetPixel = NULL; - ULONG PatternX = 0, PatternY = 0; + LONG PatternX = 0, PatternY = 0; BOOL UsesSource = ROP4_USES_SOURCE(ROP); BOOL UsesPattern = ROP4_USES_PATTERN(ROP); diff --git a/reactos/subsystems/win32/win32k/eng/bitblt.c b/reactos/subsystems/win32/win32k/eng/bitblt.c index 0bebfce1c33..318e8790362 100644 --- a/reactos/subsystems/win32/win32k/eng/bitblt.c +++ b/reactos/subsystems/win32/win32k/eng/bitblt.c @@ -938,8 +938,8 @@ EngStretchBltROP( } if (OutputRect.bottom < OutputRect.top) { - OutputRect.left = prclDest->right; - OutputRect.right = prclDest->left; + OutputRect.top = prclDest->bottom; + OutputRect.bottom = prclDest->top; } InputRect = *prclSrc; @@ -1198,8 +1198,8 @@ IntEngStretchBlt(SURFOBJ *psoDest, } InputRect = *SourceRect; - if (InputClippedRect.right < InputClippedRect.left || - InputClippedRect.bottom < InputClippedRect.top) + if (InputRect.right < InputRect.left || + InputRect.bottom < InputRect.top) { /* Everything clipped away, nothing to do */ return TRUE;