From d1532096b88501e8074d7bbb2e28be272a7cd31d Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 14 Oct 2011 18:03:07 +0000 Subject: [PATCH] [WIN32K] * Fix a copy-paste error in EngBitBlt() and improve DIB_32BPP_ColorFill() behaviour in case when input rectangle is invalid (RECTL structure fields are signed, so "jle" instruction should be used instead of "jbe"). * Patch by Igor Sudarikov <4seev3 at gmail [dot] com> See issue #4423 for more details. svn path=/trunk/; revision=54138 --- .../win32/win32k/dib/i386/dib32bpp_colorfill.s | 4 ++-- reactos/subsystems/win32/win32k/eng/bitblt.c | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s b/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s index 00a83804a73..39743a596c4 100644 --- a/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s +++ b/reactos/subsystems/win32/win32k/dib/i386/dib32bpp_colorfill.s @@ -39,11 +39,11 @@ _DIB_32BPP_ColorFill: mov ebx, [edx+8] /* ebx = prcl->right; */ sub ebx, [edx] /* ebx = prcl->right - prcl->left; */ - jbe .end /* if (ebx <= 0) goto end; */ + jle .end /* if (ebx <= 0) goto end; */ mov edx, [edx+12] /* edx = prcl->bottom; */ sub edx, edi /* edx -= prcl->top; */ - jbe .end /* if (eax <= 0) goto end; */ + jle .end /* if (eax <= 0) goto end; */ mov eax, [ebp+16] /* eax = iColor; */ cld diff --git a/reactos/subsystems/win32/win32k/eng/bitblt.c b/reactos/subsystems/win32/win32k/eng/bitblt.c index 189eb679a67..93464877af9 100644 --- a/reactos/subsystems/win32/win32k/eng/bitblt.c +++ b/reactos/subsystems/win32/win32k/eng/bitblt.c @@ -349,16 +349,7 @@ EngBitBlt(SURFOBJ *DestObj, //DPRINT1("Rop4 : 0x%08x\n", Rop4); OutputRect = *DestRect; - if (OutputRect.right < OutputRect.left) - { - OutputRect.left = DestRect->right; - OutputRect.right = DestRect->left; - } - if (OutputRect.bottom < OutputRect.top) - { - OutputRect.left = DestRect->right; - OutputRect.right = DestRect->left; - } + RECTL_vMakeWellOrdered(&OutputRect); if (UsesSource) {