src/SDL12_compat.c
changeset 61 832594ced260
parent 60 76cf0dc4bce4
child 62 a26906f18e84
     1.1 --- a/src/SDL12_compat.c	Wed Feb 13 20:56:09 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Wed Feb 13 20:56:19 2019 -0500
     1.3 @@ -2483,7 +2483,7 @@
     1.4  RWops12to20_size(struct SDL_RWops *rwops20)
     1.5  {
     1.6      SDL12_RWops *rwops12 = (SDL12_RWops *) rwops20->hidden.unknown.data1;
     1.7 -    int size = rwops20->hidden.unknown.data2;
     1.8 +    int size = (int) ((size_t) rwops20->hidden.unknown.data2);
     1.9      int pos;
    1.10  
    1.11      if (size != -1)
    1.12 @@ -2497,8 +2497,8 @@
    1.13      if (size == -1)
    1.14          return -1;
    1.15  
    1.16 -    rwops12->seek(rwops12, pos, SEEK_SET);  /* !!! FIXME: and if this fails? */
    1.17 -    rwops20->hidden.unknown.data2 = size;
    1.18 +    rwops12->seek(rwops12, pos, SEEK_SET);  FIXME("...and if this fails?");
    1.19 +    rwops20->hidden.unknown.data2 = (void *) ((size_t) size);
    1.20      return size;
    1.21  }
    1.22  
    1.23 @@ -2555,7 +2555,7 @@
    1.24      SDL20_zerop(rwops20);
    1.25      rwops20->type = rwops12->type;
    1.26      rwops20->hidden.unknown.data1 = rwops12;
    1.27 -    rwops20->hidden.unknown.data2 = -1;  /* cached size of stream */
    1.28 +    rwops20->hidden.unknown.data2 = (void *) ((size_t) -1);  /* cached size of stream */
    1.29      rwops20->size = RWops12to20_size;
    1.30      rwops20->seek = RWops12to20_seek;
    1.31      rwops20->read = RWops12to20_read;