aboutsummaryrefslogtreecommitdiff
path: root/backends/saves/compressed/compressed-saves.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/saves/compressed/compressed-saves.cpp')
-rw-r--r--backends/saves/compressed/compressed-saves.cpp3
1 files changed, 2 insertions, 1 deletions
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() {