diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-11-10 01:32:22 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-11-10 01:32:22 +0000 |
commit | 0ff20b1aac36808f86b110d3028b6913c0634de7 (patch) | |
tree | a180b0b54bb2221980b4119f4acfe685be0216f3 /updater/zbin/minizip/ioapi.c | |
parent | 63ea931032b288b78e611cf45543b655be295d16 (diff) |
More appropriate minizip fix
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@550 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'updater/zbin/minizip/ioapi.c')
-rw-r--r-- | updater/zbin/minizip/ioapi.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/updater/zbin/minizip/ioapi.c b/updater/zbin/minizip/ioapi.c index c3f75ce..0916ffa 100644 --- a/updater/zbin/minizip/ioapi.c +++ b/updater/zbin/minizip/ioapi.c @@ -32,11 +32,22 @@ long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZP return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); else { - uLong offsetTruncated = (uLong)offset; - if (offsetTruncated != offset) - return -1; - else - return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + if (origin == ZLIB_FILEFUNC_SEEK_SET) + { + uLong offsetTruncated = (uLong)offset; + if (offsetTruncated != offset) + return -1; + else + return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + } + else + { + long offsetTruncated = (long)(__int64)offset; + if (offsetTruncated != (__int64)offset) + return -1; + else + return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + } } } |