Fix ZipIO crash when reused (and possible leaks).

This commit is contained in:
bruvzg committed 2022-05-11 16:08:17 +03:00
1 parent 9963ae3553
commit d36c5514d3
12 files changed
+70 -41

No files matched your search

+2 -1
View File
@@ -33,7 +33,8 @@
#include "core/config/project_settings.h"
Error EditorExportPlatformJavaScript::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) {
zlib_filefunc_def io = zipio_create_io();
Ref<FileAccess> io_fa;
zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(p_template.utf8().get_data(), &io);
if (!pkg) {