src/file/SDL_rwops.c
changeset 11236 8c3cba28b1fd
parent 11234 b5cf1e85ffd5
child 11304 03d0ffb1f3dd
     1.1 --- a/src/file/SDL_rwops.c	Sat Aug 12 00:01:24 2017 -0700
     1.2 +++ b/src/file/SDL_rwops.c	Sat Aug 12 00:04:46 2017 -0700
     1.3 @@ -676,13 +676,13 @@
     1.4      if (size < 0) {
     1.5          size = FILE_CHUNK_SIZE;
     1.6      }
     1.7 -    data = SDL_malloc(size+1);
     1.8 +    data = SDL_malloc((size_t)(size + 1));
     1.9  
    1.10      size_total = 0;
    1.11      for (;;) {
    1.12          if ((size_total + FILE_CHUNK_SIZE) > size) {
    1.13              size = (size_total + FILE_CHUNK_SIZE);
    1.14 -            newdata = SDL_realloc(data, size + 1);
    1.15 +            newdata = SDL_realloc(data, (size_t)(size + 1));
    1.16              if (!newdata) {
    1.17                  SDL_free(data);
    1.18                  data = NULL;