mz_zip.c - correctly close entry with streams other than split_stream

This commit is contained in:
Thomas Gamper 2023-06-07 18:02:39 +02:00 committed by Nathan Moinvaziri
parent 769c6f3d26
commit a4ccb74add

View File

@ -2199,9 +2199,8 @@ int32_t mz_zip_entry_write_close(void *handle, uint32_t crc32, int64_t compresse
if (err == MZ_OK) {
/* Seek to crc32 and sizes offset in local header */
err = mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, zip->file_info.disk_number);
if (err == MZ_OK)
err = mz_stream_seek(zip->stream, zip->file_info.disk_offset + MZ_ZIP_OFFSET_CRC_SIZES, MZ_SEEK_SET);
mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, zip->file_info.disk_number);
err = mz_stream_seek(zip->stream, zip->file_info.disk_offset + MZ_ZIP_OFFSET_CRC_SIZES, MZ_SEEK_SET);
}
if (err == MZ_OK)