summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-02-26 15:33:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-02-26 15:33:04 (GMT)
commitc8c30d6dacd71f453e3bfb95c66cbee3df3468e0 (patch)
treeef78c2d1c6d9e609ffd56e60c2882a85d154cd74 /generic/tclZlib.c
parent3b5e7e9792b9b34111146557a3353756711b8133 (diff)
parent1609a65c29afebbca87366c03e2aed20468ca7e5 (diff)
downloadtcl-c8c30d6dacd71f453e3bfb95c66cbee3df3468e0.zip
tcl-c8c30d6dacd71f453e3bfb95c66cbee3df3468e0.tar.gz
tcl-c8c30d6dacd71f453e3bfb95c66cbee3df3468e0.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 c231f44..96b8318 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;
}