summaryrefslogtreecommitdiff
path: root/platform/uwp/export
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-07-23 09:14:31 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-07-23 09:14:31 +0200
commitaab8da25ad2c3e6d2df03abbc8e35c1725938c40 (patch)
treea98f3ddd124571378b146209beb308eb2768f9bc /platform/uwp/export
parente466dc2daa8eee7e6fb5a7fce40bf9e988a927cb (diff)
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);