Skip to content

Commit

Permalink
Zip support: broken CRC check / unzCloseCurrentFile
Browse files Browse the repository at this point in the history
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
mingulov committed Nov 11, 2012
1 parent 44a3f12 commit ce6f104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos2dx/support/zip_support/unzip.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit ce6f104

Please sign in to comment.