src/video/SDL_bmp.c
changeset 6666 018f8019ce36
parent 6389 43a190ad60a7
child 6885 700f1b25f77f
     1.1 --- a/src/video/SDL_bmp.c	Thu Nov 08 01:07:29 2012 -0800
     1.2 +++ b/src/video/SDL_bmp.c	Thu Nov 08 02:26:40 2012 -0800
     1.3 @@ -51,7 +51,7 @@
     1.4  SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
     1.5  {
     1.6      SDL_bool was_error;
     1.7 -    long fp_offset = 0;
     1.8 +    Sint64 fp_offset = 0;
     1.9      int bmpPitch;
    1.10      int i, pad;
    1.11      SDL_Surface *surface;
    1.12 @@ -371,7 +371,7 @@
    1.13  int
    1.14  SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst)
    1.15  {
    1.16 -    long fp_offset;
    1.17 +    Sint64 fp_offset;
    1.18      int i, pad;
    1.19      SDL_Surface *surface;
    1.20      Uint8 *bits;
    1.21 @@ -515,7 +515,7 @@
    1.22          }
    1.23  
    1.24          /* Write the bitmap offset */
    1.25 -        bfOffBits = SDL_RWtell(dst) - fp_offset;
    1.26 +        bfOffBits = (Uint32)(SDL_RWtell(dst) - fp_offset);
    1.27          if (SDL_RWseek(dst, fp_offset + 10, RW_SEEK_SET) < 0) {
    1.28              SDL_Error(SDL_EFSEEK);
    1.29          }
    1.30 @@ -542,7 +542,7 @@
    1.31          }
    1.32  
    1.33          /* Write the BMP file size */
    1.34 -        bfSize = SDL_RWtell(dst) - fp_offset;
    1.35 +        bfSize = (Uint32)(SDL_RWtell(dst) - fp_offset);
    1.36          if (SDL_RWseek(dst, fp_offset + 2, RW_SEEK_SET) < 0) {
    1.37              SDL_Error(SDL_EFSEEK);
    1.38          }