Permalink
Browse files

Zip support: broken CRC check / unzCloseCurrentFile

A fix for changes at 0ba2e66
- unzOpenCurrentFile3 has set pfile_in_zip_read_info->crc32_wait
just in case if Zip file has unknown structure / might not be
unpacked, so almost any unpacked file was considered as having
UNZ_CRCERROR.
  • Loading branch information...
1 parent 44a3f12 commit ce6f104cdc844b165cfa4583f2283fe5867c3b0c @mingulov committed Nov 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cocos2dx/support/zip_support/unzip.cpp
@@ -1536,7 +1536,7 @@ int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
/* #endif */
(s->cur_file_info.compression_method!=Z_DEFLATED))
- //err=UNZ_BADZIPFILE;
+ ;//err=UNZ_BADZIPFILE;
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
pfile_in_zip_read_info->crc32=0;

0 comments on commit ce6f104

Please sign in to comment.