Skip to content

Commit a9d78e0

Browse files
committed
nx-X11/programs/Xserver/hw/nxagent/Screen.c: fix intersection break-out.
1 parent 16f2f06 commit a9d78e0

File tree

1 file changed

+1
-2
lines changed
  • nx-X11/programs/Xserver/hw/nxagent

1 file changed

+1
-2
lines changed

nx-X11/programs/Xserver/hw/nxagent/Screen.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,8 +3646,7 @@ static Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah,
36463646
/* thanks to http://silentmatt.com/rectangle-intersection */
36473647

36483648
/* check if there's any intersection at all */
3649-
if (ax2 < bx1 || bx2 < ax1 || ay2 < by1 || by2 < ay1) {
3650-
3649+
if ((ax1 >= bx2) || (ax2 <= bx1) || (ay1 >= by2) || (ay2 <= by1)) {
36513650
#ifdef DEBUG
36523651
fprintf(stderr, "intersect: the given rectangles do not intersect at all\n");
36533652
#endif

0 commit comments

Comments
 (0)