From d3ed29ef06513cb9e9f817a75c8f5875599248d7 Mon Sep 17 00:00:00 2001 From: Ahmed Arif Date: Mon, 8 Jun 2026 15:42:33 +0200 Subject: [PATCH] [NTGDI][POLYTEST] Use newx1 as the lower bound in polyfill line-touch test (#9118) Bug/typo was introduced in https://github.com/reactos/reactos/commit/5b6d43ab50b88d2ab8fd3d7ebf434173c5768065 (r5619). --- modules/rostests/tests/polytest/polytest.cpp | 2 +- win32ss/gdi/ntgdi/polyfill.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/tests/polytest/polytest.cpp b/modules/rostests/tests/polytest/polytest.cpp index 53567c6a6d2..a89f22beb1b 100644 --- a/modules/rostests/tests/polytest/polytest.cpp +++ b/modules/rostests/tests/polytest/polytest.cpp @@ -612,7 +612,7 @@ POLYGONFILL_FillScanLineWinding( if ( (newx1 >= x1 && newx1 <= x2) || (newx2 >= x1 && newx2 <= x2) || (x1 >= newx1 && x1 <= newx2) - || (x2 >= newx2 && x2 <= newx2) + || (x2 >= newx1 && x2 <= newx2) ) { // yup, just tack it on to our existing line diff --git a/win32ss/gdi/ntgdi/polyfill.c b/win32ss/gdi/ntgdi/polyfill.c index d6bd2bdb73d..ab7af9603f2 100644 --- a/win32ss/gdi/ntgdi/polyfill.c +++ b/win32ss/gdi/ntgdi/polyfill.c @@ -475,7 +475,7 @@ POLYGONFILL_FillScanLineWinding( if ((newx1 >= x1 && newx1 <= x2) || (newx2 >= x1 && newx2 <= x2) || (x1 >= newx1 && x1 <= newx2) || - (x2 >= newx2 && x2 <= newx2)) + (x2 >= newx1 && x2 <= newx2)) { // Yup, just tack it on to our existing line x1 = min(x1,newx1);