changeset 4027:407ecf3ad3b3 SDL-1.2

Fixed signed/unsigned mismatch ... hmm, limited to 2 GB reads? Fix in SDL 1.3
author Sam Lantinga <slouken@libsdl.org>
date Tue, 10 Jul 2007 04:31:31 +0000
parents 255b0469ca83
children 81837116ef59
files src/file/SDL_rwops.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;