archive: replace zip_get_num_files (deprecated) by zip_get_num_entries

This commit is contained in:
scribam 2023-07-22 17:51:43 +02:00 committed by flyinghead
parent 1b565f9879
commit 4f5fd31d81
1 changed files with 4 additions and 3 deletions

View File

@ -51,15 +51,16 @@ ArchiveFile* ZipArchive::OpenFile(const char* name)
struct zip_file *zip_fopen_by_crc(struct zip *za, u32 crc, int flags)
{
int i, n;
zip_uint64_t i;
zip_int64_t n;
struct zip_stat stat;
if (crc == 0) {
return NULL;
}
n = zip_get_num_files(za);
for (i = 0; i < n; i++) {
n = zip_get_num_entries(za, 0);
for (i = 0; i < (zip_uint64_t)n; i++) {
if (zip_stat_index(za, i, flags, &stat) < -1) {
return NULL;
}