Explorar o código

Merge pull request #34 from yangfasheng/master

update region.c
yangfasheng %!s(int64=7) %!d(string=hai) anos
pai
achega
6350b9a617
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/region.c

+ 3 - 3
src/region.c

@@ -408,7 +408,7 @@ rtgui_region_appendNonO(
 
     newRects = rEnd - r;
 
-    RT_ASSERT(y1 < y2);
+    RT_ASSERT(y1 <= y2);
     RT_ASSERT(newRects != 0);
 
     /* Make sure we have enough space for all rectangles to be added */
@@ -616,7 +616,7 @@ rtgui_op(
             {
                 top = RTGUI_MAX(r1y1, ybot);
                 bot = RTGUI_MIN(r1->y2, r2y1);
-                if (top < bot)
+                if (top <= bot)
                 {
                     curBand = newReg->data->numRects;
                     rtgui_region_appendNonO(newReg, r1, r1BandEnd, top, bot);
@@ -631,7 +631,7 @@ rtgui_op(
             {
                 top = RTGUI_MAX(r2y1, ybot);
                 bot = RTGUI_MIN(r2->y2, r1y1);
-                if (top < bot)
+                if (top <= bot)
                 {
                     curBand = newReg->data->numRects;
                     rtgui_region_appendNonO(newReg, r2, r2BandEnd, top, bot);