From 4f5fd31d81e229b1ed0cab890e92eb03fcb991f0 Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 22 Jul 2023 17:51:43 +0200 Subject: [PATCH] archive: replace zip_get_num_files (deprecated) by zip_get_num_entries --- core/archive/ZipArchive.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/archive/ZipArchive.cpp b/core/archive/ZipArchive.cpp index fe24b3420..29a104987 100644 --- a/core/archive/ZipArchive.cpp +++ b/core/archive/ZipArchive.cpp @@ -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; }