From a5f34ae1da559b8733b478d24c9c684d4684c931 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 3 Jun 2007 14:14:51 +0000 Subject: Initialized _stream.avail_in (and fixed a typo in a comment) after discussing with Fingolfin. This seems to fix the mysterious bug #1726120, though I'll need to test that a bit more before closing it. svn-id: r27062 --- backends/saves/compressed/compressed-saves.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends') diff --git a/backends/saves/compressed/compressed-saves.cpp b/backends/saves/compressed/compressed-saves.cpp index 83c33fdae5..2adae229f5 100644 --- a/backends/saves/compressed/compressed-saves.cpp +++ b/backends/saves/compressed/compressed-saves.cpp @@ -183,7 +183,7 @@ protected: int _zlibErr; void processData(int flushType) { - // This function is called by both write() and finalize. + // This function is called by both write() and finalize(). while (_zlibErr == Z_OK && (_stream.avail_in || flushType == Z_FINISH)) { if (_stream.avail_out == 0) { if (_wrapped->write(_buf, BUFSIZE) != BUFSIZE) { @@ -218,6 +218,7 @@ public: _stream.next_out = _buf; _stream.avail_out = BUFSIZE; + _stream.avail_in = 0; } ~CompressedOutSaveFile() { -- cgit v1.2.3