src/SDL12_compat.c
changeset 67 4df59270e628
parent 66 5cd0103f58ca
child 68 29c66e3bd07e
     1.1 --- a/src/SDL12_compat.c	Mon Feb 18 00:25:14 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Mon Feb 18 00:25:42 2019 -0500
     1.3 @@ -1408,12 +1408,13 @@
     1.4  DECLSPEC int SDLCALL
     1.5  SDL_FillRect(SDL12_Surface *dst, SDL_Rect *dstrect, Uint32 color)
     1.6  {
     1.7 -    const SDL_Rect orig_dstrect = *dstrect;
     1.8 -    const int retval = SDL20_FillRect(dst->surface20, &orig_dstrect, color);
     1.9 +    const int retval = SDL20_FillRect(dst->surface20, dstrect, color);
    1.10      if (retval != -1)
    1.11      {
    1.12 -        if (dstrect)  /* 1.2 stores the clip intersection in dstrect */
    1.13 +        if (dstrect) {  /* 1.2 stores the clip intersection in dstrect */
    1.14 +            const SDL_Rect orig_dstrect = *dstrect;
    1.15              SDL20_IntersectRect(&orig_dstrect, &dst->clip_rect, dstrect);
    1.16 +        }
    1.17      }
    1.18      return retval;
    1.19  }