diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-23 15:08:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 15:08:44 +0200 |
commit | 4c943cca2c6d6cd7a197cb1601a6356e65254837 (patch) | |
tree | 0f906f50ff2013f20a274ea6c746c6574a15e1f2 /platform/uwp/export | |
parent | c7a427241e7f4dd6ab9ac89f51d3bb9f6632008b (diff) | |
parent | aab8da25ad2c3e6d2df03abbc8e35c1725938c40 (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.cpp | 4 |
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); |