Fixed lines intersecting the top corners of a rectangle
authorSam Lantinga <slouken@libsdl.org>
Mon, 05 Jan 2009 07:07:48 +0000
changeset 3004 f3d7226a8dfd
parent 3003 699d68ef2aca
child 3005 7b7a25d08829
Fixed lines intersecting the top corners of a rectangle
src/video/SDL_rect.c
--- a/src/video/SDL_rect.c	Mon Jan 05 07:04:54 2009 +0000
+++ b/src/video/SDL_rect.c	Mon Jan 05 07:07:48 2009 +0000
@@ -150,7 +150,7 @@
 
     /* 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;
     }