aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Milburn2011-08-04 21:52:26 +0200
committerAlyssa Milburn2011-08-04 21:55:28 +0200
commita8896be85ea332c0f5d6c7009e4f6e70133d1f6f (patch)
tree3c8ae6d2930f2ef8c2251618446b746537b5f9b8
parent62a22b62931fc43705a9bf62383e58896b53ddb4 (diff)
downloadscummvm-rg350-a8896be85ea332c0f5d6c7009e4f6e70133d1f6f.tar.gz
scummvm-rg350-a8896be85ea332c0f5d6c7009e4f6e70133d1f6f.tar.bz2
scummvm-rg350-a8896be85ea332c0f5d6c7009e4f6e70133d1f6f.zip
COMMON: Initialize more z_stream fields before calling inflateInit2.
The zlib documentation and examples claim this is needed, as spotted by LordHoto.
-rw-r--r--common/zlib.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/zlib.cpp b/common/zlib.cpp
index b047586af0..71a25bd951 100644
--- a/common/zlib.cpp
+++ b/common/zlib.cpp
@@ -76,6 +76,8 @@ public:
_stream.zalloc = Z_NULL;
_stream.zfree = Z_NULL;
_stream.opaque = Z_NULL;
+ _stream.avail_in = 0;
+ _stream.next_in = Z_NULL;
// Verify file header is correct
w->seek(0, SEEK_SET);