Skip to content

Commit

Permalink
nx-X11/programs/Xserver/hw/nxagent/Screen.c: fix intersection break-out.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionic committed Jun 4, 2018
1 parent 5a3a1f4 commit a8bc1b8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nx-X11/programs/Xserver/hw/nxagent/Screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -3646,8 +3646,7 @@ static Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah,
/* thanks to http://silentmatt.com/rectangle-intersection */

/* check if there's any intersection at all */
if (ax2 < bx1 || bx2 < ax1 || ay2 < by1 || by2 < ay1) {

if ((ax1 >= bx2) || (ax2 <= bx1) || (ay1 >= by2) || (ay2 <= by1)) {
#ifdef DEBUG
fprintf(stderr, "intersect: the given rectangles do not intersect at all\n");
#endif
Expand Down

0 comments on commit a8bc1b8

Please sign in to comment.