Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Make sure we fully clip the first point before starting to adjust the…

… second point.
  • Loading branch information
slouken committed Dec 11, 2009
1 parent 678acaa commit 494bf8e41317fed189ffe4eaaaaf555480cd8525
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/video/SDL_rect.c
@@ -311,9 +311,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
x1 = x;
y1 = y;
outcode1 = ComputeOutCode(rect, x, y);
}

if (outcode2) {
} else {
if (outcode2 & CODE_TOP) {
y = recty1;
x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);

0 comments on commit 494bf8e

Please sign in to comment.