src/file/SDL_rwops.c
changeset 2179 8b76cc268771
parent 2173 26233707bc94
child 2185 2032348afed1
equal deleted inserted replaced
2178:114a541cfae2 2179:8b76cc268771
   189 
   189 
   190     if (context->hidden.win32io.buffer.left > 0) {
   190     if (context->hidden.win32io.buffer.left > 0) {
   191         void *data = (char *) context->hidden.win32io.buffer.data +
   191         void *data = (char *) context->hidden.win32io.buffer.data +
   192             context->hidden.win32io.buffer.size -
   192             context->hidden.win32io.buffer.size -
   193             context->hidden.win32io.buffer.left;
   193             context->hidden.win32io.buffer.left;
   194         read_ahead = SDL_min(total_need, context->hidden.win32io.buffer.left);
   194         read_ahead = SDL_min(total_need, (size_t)context->hidden.win32io.buffer.left);
   195         SDL_memcpy(ptr, data, read_ahead);
   195         SDL_memcpy(ptr, data, read_ahead);
   196         context->hidden.win32io.buffer.left -= read_ahead;
   196         context->hidden.win32io.buffer.left -= read_ahead;
   197 
   197 
   198         if (read_ahead == total_need) {
   198         if (read_ahead == total_need) {
   199             return maxnum;
   199             return maxnum;