summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-02-26 15:32:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-02-26 15:32:11 (GMT)
commit1609a65c29afebbca87366c03e2aed20468ca7e5 (patch)
treee628fbf6702335dd63404aa0fe978dd45d0cfa17 /generic/tclZlib.c
parent9b8fe92d1ec10b1010d91d504deab315538cce0e (diff)
parenta9c42fa686ab9236f5218c276ce4bfdc7655ab16 (diff)
downloadtcl-1609a65c29afebbca87366c03e2aed20468ca7e5.zip
tcl-1609a65c29afebbca87366c03e2aed20468ca7e5.tar.gz
tcl-1609a65c29afebbca87366c03e2aed20468ca7e5.tar.bz2
[25842c161f] Ensure that finalization of a zlib stream works.
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index e5a5946..82486d2 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -1204,10 +1204,10 @@ Tcl_ZlibStreamPut(
zshPtr->stream.avail_in = size;
/*
- * Must not do a zero-length compress. [Bug 25842c161]
+ * Must not do a zero-length compress unless finalizing. [Bug 25842c161]
*/
- if (size == 0) {
+ if (size == 0 && flush != Z_FINISH) {
return TCL_OK;
}