From 99fb90015ba027e8d15865a44bb44e075505c137 Mon Sep 17 00:00:00 2001 From: alqualos Date: Wed, 23 Jul 2014 18:58:04 +0000 Subject: [PATCH] Fixed portability error for systems with 64-bit long --- quazip/quazip/unzip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quazip/quazip/unzip.c b/quazip/quazip/unzip.c index 3221808..bca03f8 100644 --- a/quazip/quazip/unzip.c +++ b/quazip/quazip/unzip.c @@ -1050,26 +1050,26 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, { uLong uL; - if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1) + if(file_info.uncompressed_size == (ZPOS64_T)0xFFFFFFFFu) { if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) err=UNZ_ERRNO; } - if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1) + if(file_info.compressed_size == (ZPOS64_T)0xFFFFFFFFu) { if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) err=UNZ_ERRNO; } - if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1) + if(file_info_internal.offset_curfile == (ZPOS64_T)0xFFFFFFFFu) { /* Relative Header offset */ if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) err=UNZ_ERRNO; } - if(file_info.disk_num_start == (unsigned long)-1) + if(file_info.disk_num_start == 0xFFFFFFFFu) { /* Disk Start Number */ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)