Merge pull request #315 from zhaozg/master

fix ops detect for MZ_ZIP_TYPE_USER
This commit is contained in:
Martin Raiber 2024-07-09 23:07:05 +02:00 committed by GitHub
commit bf7a1f0a5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -807,7 +807,8 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
}
/* Update the archive start position, but only if not specified. */
if ((pZip->m_zip_type == MZ_ZIP_TYPE_FILE || pZip->m_zip_type == MZ_ZIP_TYPE_CFILE) && pZip->m_pState->m_file_archive_start_ofs == 0)
if ((pZip->m_zip_type == MZ_ZIP_TYPE_FILE || pZip->m_zip_type == MZ_ZIP_TYPE_CFILE ||
pZip->m_zip_type == MZ_ZIP_TYPE_USER) && pZip->m_pState->m_file_archive_start_ofs == 0)
{
pZip->m_pState->m_file_archive_start_ofs = archive_ofs;
pZip->m_archive_size -= archive_ofs;