From 0ff20b1aac36808f86b110d3028b6913c0634de7 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Wed, 10 Nov 2010 01:32:22 +0000 Subject: More appropriate minizip fix git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@550 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/zbin/minizip/unzip.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'updater/zbin/minizip/unzip.c') diff --git a/updater/zbin/minizip/unzip.c b/updater/zbin/minizip/unzip.c index fc956ab..44f9876 100644 --- a/updater/zbin/minizip/unzip.c +++ b/updater/zbin/minizip/unzip.c @@ -985,7 +985,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, // Read extrafield if ((err==UNZ_OK) && (extraField!=NULL)) { - ZPOS64_T uSizeRead, uPosRead; + ZPOS64_T uSizeRead ; if (file_info.size_file_extraz_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead) err=UNZ_ERRNO; - uPosRead = ZTELL64(s->z_filefunc, s->filestream); - ZSEEK64(s->z_filefunc, s->filestream,uPosRead - uSizeRead,ZLIB_FILEFUNC_SEEK_SET); + lSeek += file_info.size_file_extra - (uLong)uSizeRead; } + else + lSeek += file_info.size_file_extra; - lSeek += file_info.size_file_extra; if ((err==UNZ_OK) && (file_info.size_file_extra != 0)) { @@ -1761,7 +1761,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len) pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; } - if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) + if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) { uInt uDoCopy,i ; -- cgit v1.2.3