summaryrefslogtreecommitdiff
path: root/editor/project_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r--editor/project_manager.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index cbc4bb03f6..501cb88547 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -202,6 +202,9 @@ private:
unz_file_info info;
char fname[16384];
ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0);
+ if (ret != UNZ_OK) {
+ break;
+ }
if (String::utf8(fname).ends_with("project.godot")) {
break;
@@ -534,6 +537,9 @@ private:
unz_file_info info;
char fname[16384];
ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0);
+ if (ret != UNZ_OK) {
+ break;
+ }
String path = String::utf8(fname);
@@ -552,7 +558,10 @@ private:
//read
unzOpenCurrentFile(pkg);
- unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ ret = unzReadCurrentFile(pkg, data.ptrw(), data.size());
+ if (ret != UNZ_OK) {
+ break;
+ }
unzCloseCurrentFile(pkg);
FileAccess *f = FileAccess::open(dir.plus_file(rel_path), FileAccess::WRITE);