X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Fdeps%2Fzlib-1.2.13%2Fgzlib.c;fp=deps%2Flibchdr%2Fdeps%2Fzlib-1.2.11%2Fgzlib.c;h=55da46a453fd18458828d0a1e55dbad667130d61;hb=9e052883388b2b607a488e48b3cb6db52a0997dd;hp=4105e6aff92594fb9cfa557aa8349cea5a5d4a2b;hpb=7e49a25d527a1d79569f39a6f2d8d28a0d6cebd5;p=pcsx_rearmed.git diff --git a/deps/libchdr/deps/zlib-1.2.11/gzlib.c b/deps/libchdr/deps/zlib-1.2.13/gzlib.c similarity index 98% rename from deps/libchdr/deps/zlib-1.2.11/gzlib.c rename to deps/libchdr/deps/zlib-1.2.13/gzlib.c index 4105e6af..55da46a4 100644 --- a/deps/libchdr/deps/zlib-1.2.11/gzlib.c +++ b/deps/libchdr/deps/zlib-1.2.13/gzlib.c @@ -1,11 +1,11 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004-2017 Mark Adler + * Copyright (C) 2004-2019 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "gzguts.h" -#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__BORLANDC__) # define LSEEK _lseeki64 #else #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 @@ -30,7 +30,7 @@ local gzFile gz_open OF((const void *, int, const char *)); The gz_strwinerror function does not change the current setting of GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (error) +char ZLIB_INTERNAL *gz_strwinerror(error) DWORD error; { static char buf[1024]; @@ -81,6 +81,8 @@ local void gz_reset(state) state->past = 0; /* have not read past end yet */ state->how = LOOK; /* look for gzip header */ } + else /* for writing ... */ + state->reset = 0; /* no deflateReset pending */ state->seek = 0; /* no seek request pending */ gz_error(state, Z_OK, NULL); /* clear error */ state->x.pos = 0; /* no uncompressed data yet */ @@ -397,7 +399,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence) /* if within raw area while reading, just go there */ if (state->mode == GZ_READ && state->how == COPY && state->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); + ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR); if (ret == -1) return -1; state->x.have = 0;