Fix duplicate close files when deconstructing ZipArchive

This commit is contained in:
Zae 2021-05-24 14:25:02 +08:00
parent 635d0c9b44
commit a65dac3fa7

View File

@ -226,9 +226,7 @@ ZipArchive::ZipArchive() {
ZipArchive::~ZipArchive() {
for (int i = 0; i < packages.size(); i++) {
FileAccess *f = (FileAccess *)unzGetOpaque(packages[i].zfile);
unzClose(packages[i].zfile);
memdelete(f);
}
packages.clear();