From 07db361a6e71df11360c8cb003488661a78aecca Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Sat, 1 Jun 2024 14:09:47 -0700 Subject: [PATCH] Fixed listing empty zip file. #756 --- minizip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minizip.c b/minizip.c index 3dec7a43..fb68861a 100644 --- a/minizip.c +++ b/minizip.c @@ -126,7 +126,7 @@ int32_t minizip_list(const char *path) { printf(" ------ -------- ----- ------ ------- ---- ---- ------ ----\n"); /* Enumerate all entries in the archive */ - do { + while (err == MZ_OK) { err = mz_zip_reader_entry_get_info(reader, &file_info); if (err != MZ_OK) { @@ -163,7 +163,7 @@ int32_t minizip_list(const char *path) { printf("Error %" PRId32 " going to next entry in archive\n", err); break; } - } while (err == MZ_OK); + } mz_zip_reader_delete(&reader);