From a94352ba48605a7affb323f055578e40ae49d02c Mon Sep 17 00:00:00 2001 From: Ahmed Arif Date: Mon, 8 Jun 2026 13:20:41 +0200 Subject: [PATCH] [WIN32SS:ENG] Fix copy direction in overlapping EngTransparentBlt (#9117) The brackets were around the wrong part, so the < checked the left edge against the picked direction instead of against the other left edge. Bug was introduced in https://github.com/reactos/reactos/commit/5424a511074933c1b7874cdfce28fd1e06125b12 (r8988), then improved in https://github.com/reactos/reactos/commit/07a533fe02d9f3affaa33d004159ae846cbf1eb5 (r40380), however the obvious braces issue was not noticed. --- win32ss/gdi/eng/transblt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/gdi/eng/transblt.c b/win32ss/gdi/eng/transblt.c index 862022a5d30..62200bd31ad 100644 --- a/win32ss/gdi/eng/transblt.c +++ b/win32ss/gdi/eng/transblt.c @@ -145,11 +145,11 @@ EngTransparentBlt( { if (OutputRect.top < InputRect.top) { - Direction = OutputRect.left < (InputRect.left ? CD_RIGHTDOWN : CD_LEFTDOWN); + Direction = OutputRect.left < InputRect.left ? CD_RIGHTDOWN : CD_LEFTDOWN; } else { - Direction = OutputRect.left < (InputRect.left ? CD_RIGHTUP : CD_LEFTUP); + Direction = OutputRect.left < InputRect.left ? CD_RIGHTUP : CD_LEFTUP; } } else