Fixed signed/unsigned mismatch ... hmm, limited to 2 GB reads? Fix in SDL 1.3 SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Tue, 10 Jul 2007 04:31:31 +0000
branchSDL-1.2
changeset 4027407ecf3ad3b3
parent 4026 255b0469ca83
child 4028 81837116ef59
Fixed signed/unsigned mismatch ... hmm, limited to 2 GB reads? Fix in SDL 1.3
src/file/SDL_rwops.c
     1.1 --- a/src/file/SDL_rwops.c	Tue Jul 10 04:01:46 2007 +0000
     1.2 +++ b/src/file/SDL_rwops.c	Tue Jul 10 04:31:31 2007 +0000
     1.3 @@ -187,7 +187,7 @@
     1.4              SDL_Error(SDL_EFREAD);
     1.5              return 0;
     1.6          }
     1.7 -        read_ahead = SDL_min(total_need, byte_read);
     1.8 +        read_ahead = SDL_min(total_need, (int)byte_read);
     1.9          SDL_memcpy(ptr, context->hidden.win32io.buffer.data, read_ahead);
    1.10          context->hidden.win32io.buffer.size = byte_read;
    1.11          context->hidden.win32io.buffer.left = byte_read-read_ahead;