diff options
-rw-r--r-- | core/io/file_access_zip.cpp | 3 | ||||
-rw-r--r-- | core/io/pck_packer.cpp | 1 | ||||
-rw-r--r-- | drivers/unix/os_unix.cpp | 2 | ||||
-rw-r--r-- | modules/dlscript/godot/godot_string.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index 4cc2edd1c3..47432b1e97 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -149,8 +149,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const { unzFile pkg = unzOpen2(packages[file.package].filename.utf8().get_data(), &io); ERR_FAIL_COND_V(!pkg, NULL); int unz_err = unzGoToFilePos(pkg, &file.file_pos); - ERR_FAIL_COND_V(unz_err != UNZ_OK, NULL); - if (unzOpenCurrentFile(pkg) != UNZ_OK) { + if (unz_err != UNZ_OK || unzOpenCurrentFile(pkg) != UNZ_OK) { unzClose(pkg); ERR_FAIL_V(NULL); diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index 9dd9b044a2..974ed64267 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -172,6 +172,7 @@ Error PCKPacker::flush(bool p_verbose) { printf("\n"); file->close(); + memdelete(buf); return OK; }; diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 6e0674d060..ea765e8f8a 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -453,7 +453,7 @@ Error OS_Unix::close_dynamic_library(void *p_library_handle) { } Error OS_Unix::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle) { - char *error; + const char *error; dlerror(); // Clear existing errors p_symbol_handle = dlsym(p_library_handle, p_name.utf8().get_data()); diff --git a/modules/dlscript/godot/godot_string.cpp b/modules/dlscript/godot/godot_string.cpp index 43f05500fd..97d0985a50 100644 --- a/modules/dlscript/godot/godot_string.cpp +++ b/modules/dlscript/godot/godot_string.cpp @@ -3,7 +3,7 @@ #include "string_db.h" #include "ustring.h" -#include <memory.h> +#include <string.h> #ifdef __cplusplus extern "C" { |