Commit 60b65d18 authored by Sam Lantinga's avatar Sam Lantinga

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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404286
parent 1ba0c161
...@@ -311,9 +311,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2, ...@@ -311,9 +311,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2,
x1 = x; x1 = x;
y1 = y; y1 = y;
outcode1 = ComputeOutCode(rect, x, y); outcode1 = ComputeOutCode(rect, x, y);
} } else {
if (outcode2) {
if (outcode2 & CODE_TOP) { if (outcode2 & CODE_TOP) {
y = recty1; y = recty1;
x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1); x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment