Skip to content

Commit

Permalink
Merge pull request #150 from Schievel1/fix-incompat-pointers
Browse files Browse the repository at this point in the history
fix incompatible pointers
  • Loading branch information
gdraheim authored Feb 26, 2024
2 parents 803f49a + b648589 commit 1db4fe9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions SDL/SDL_rwops_zzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
#define SDL_RWOPS_ZZIP_FILE(_context) (ZZIP_FILE*) \
((_context)->hidden.unknown.data1)

static int _zzip_seek(SDL_RWops *context, int offset, int whence)
static Sint64 _zzip_seek(SDL_RWops *context, Sint64 offset, int whence)
{
return zzip_seek(SDL_RWOPS_ZZIP_FILE(context), offset, whence);
}

static int _zzip_read(SDL_RWops *context, void *ptr, int size, int maxnum)
static size_t _zzip_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum)
{
return zzip_read(SDL_RWOPS_ZZIP_FILE(context), ptr, size*maxnum) / size;
}

static int _zzip_write(SDL_RWops *context, const void *ptr, int size, int num)
static size_t _zzip_write(SDL_RWops *context, const void *ptr, size_t size, size_t num)
{
return 0; /* ignored */
}
Expand Down
4 changes: 2 additions & 2 deletions zzip/mmapped.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,14 +665,14 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry)
off_t offset = zzip_file_header_to_data(header);
if (csize == 0xFFFFu) {
struct zzip_extra_zip64* zip64 =
zzip_file_header_to_extras(header);
(struct zzip_extra_zip64*)zzip_file_header_to_extras(header);
if (ZZIP_EXTRA_ZIP64_CHECK(zip64)) {
csize = zzip_extra_zip64_csize(zip64);
}
}
if (offset == 0xFFFFu) {
struct zzip_extra_zip64* zip64 =
zzip_file_header_to_extras(header);
(struct zzip_extra_zip64*)zzip_file_header_to_extras(header);
if (ZZIP_EXTRA_ZIP64_CHECK(zip64)) {
offset = zzip_extra_zip64_offset(zip64);
}
Expand Down

0 comments on commit 1db4fe9

Please sign in to comment.