Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed lines intersecting the top corners of a rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 5, 2009
1 parent 8a5ea62 commit f834d4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/SDL_rect.c
Expand Up @@ -150,7 +150,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,

/* Check to see if entire line is to one side of rect */
if ((x1 < rectx1 && x2 < rectx1) || (x1 > rectx2 && x2 > rectx2) ||
(y1 < recty1 && y2 < recty2) || (y1 > recty2 && y2 > recty2)) {
(y1 < recty1 && y2 < recty1) || (y1 > recty2 && y2 > recty2)) {
return SDL_FALSE;
}

Expand Down

0 comments on commit f834d4d

Please sign in to comment.