COMMON: Initialize more z_stream fields before calling inflateInit2.

The zlib documentation and examples claim this is needed, as spotted
by LordHoto.
This commit is contained in:
Alyssa Milburn 2011-08-04 21:52:26 +02:00
parent 62a22b6293
commit a8896be85e

View file

@ -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);