Skip to content

Commit

Permalink
Merge pull request #315 from zhaozg/master
Browse files Browse the repository at this point in the history
fix ops detect for MZ_ZIP_TYPE_USER
  • Loading branch information
uroni authored Jul 9, 2024
2 parents 4000bc3 + 200c905 commit bf7a1f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion miniz_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bf7a1f0

Please sign in to comment.