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);