From dac67bb21c72f8b5cdf31a07ac8e7d287b18b418 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 24 Mar 2010 17:28:59 -0300 Subject: [PATCH] Fixed some problems in jrectexclude() when y1==ey1 or y2==ye2. --- src/jinete/jdraw.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/jinete/jdraw.cpp b/src/jinete/jdraw.cpp index 6d04f18ab..40655aedf 100644 --- a/src/jinete/jdraw.cpp +++ b/src/jinete/jdraw.cpp @@ -71,7 +71,8 @@ void jrectexclude(BITMAP *bmp, int x1, int y1, int x2, int y2, my2 = MIN(y2, ey2); // top - rectfill(bmp, x1, y1, x2, ey1-1, color); + if (y1 < ey1) + rectfill(bmp, x1, y1, x2, ey1-1, color); // left if (x1 < ex1) @@ -82,7 +83,8 @@ void jrectexclude(BITMAP *bmp, int x1, int y1, int x2, int y2, rectfill(bmp, ex2+1, my1, x2, my2, color); // bottom - rectfill(bmp, x1, ey2+1, x2, y2, color); + if (y2 > ey2) + rectfill(bmp, x1, ey2+1, x2, y2, color); } }