Fix some issues found by cppcheck.

This commit is contained in:
bruvzg
2022-04-05 13:40:26 +03:00
parent 72407a9cfb
commit f851c4aa33
163 changed files with 776 additions and 767 deletions

View File

@ -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);