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 4027 407ecf3ad3b3
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
--- a/src/file/SDL_rwops.c	Tue Jul 10 04:01:46 2007 +0000
+++ b/src/file/SDL_rwops.c	Tue Jul 10 04:31:31 2007 +0000
@@ -187,7 +187,7 @@
             SDL_Error(SDL_EFREAD);
             return 0;
         }
-        read_ahead = SDL_min(total_need, byte_read);
+        read_ahead = SDL_min(total_need, (int)byte_read);
         SDL_memcpy(ptr, context->hidden.win32io.buffer.data, read_ahead);
         context->hidden.win32io.buffer.size = byte_read;
         context->hidden.win32io.buffer.left = byte_read-read_ahead;