Make sure we fully clip the first point before starting to adjust the second point.
authorSam Lantinga <slouken@libsdl.org>
Fri, 11 Dec 2009 09:57:54 +0000
changeset 354297eae5a705f9
parent 3541 0c429a5fda8a
child 3543 c2154674c0c1
Make sure we fully clip the first point before starting to adjust the second point.
src/video/SDL_rect.c
     1.1 --- a/src/video/SDL_rect.c	Fri Dec 11 09:22:34 2009 +0000
     1.2 +++ b/src/video/SDL_rect.c	Fri Dec 11 09:57:54 2009 +0000
     1.3 @@ -311,9 +311,7 @@
     1.4              x1 = x;
     1.5              y1 = y;
     1.6              outcode1 = ComputeOutCode(rect, x, y);
     1.7 -        }
     1.8 -
     1.9 -        if (outcode2) {
    1.10 +        } else {
    1.11              if (outcode2 & CODE_TOP) {
    1.12                  y = recty1;
    1.13                  x = x1 + ((x2 - x1) * (y - y1)) / (y2 - y1);