summaryrefslogtreecommitdiff
path: root/platform/uwp/export
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-23 15:08:44 +0200
committerGitHub <noreply@github.com>2019-07-23 15:08:44 +0200
commit4c943cca2c6d6cd7a197cb1601a6356e65254837 (patch)
tree0f906f50ff2013f20a274ea6c746c6574a15e1f2 /platform/uwp/export
parentc7a427241e7f4dd6ab9ac89f51d3bb9f6632008b (diff)
parentaab8da25ad2c3e6d2df03abbc8e35c1725938c40 (diff)
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
Diffstat (limited to 'platform/uwp/export')
-rw-r--r--platform/uwp/export/export.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index abb7b391d3..75ce422e9e 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -519,7 +519,9 @@ Error AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
int total_out_before = strm.total_out;
- deflate(&strm, Z_FULL_FLUSH);
+ int err = deflate(&strm, Z_FULL_FLUSH);
+ ERR_FAIL_COND_V(err >= 0, ERR_BUG); // Negative means bug
+
bh.compressed_size = strm.total_out - total_out_before;
//package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before);