diff options
author | Strangerke | 2013-06-26 23:11:34 +0200 |
---|---|---|
committer | Strangerke | 2013-06-26 23:11:34 +0200 |
commit | 6e2d567bca53b6ffee771b4105e2e73dbd73f5b4 (patch) | |
tree | 9880f0c496263ffb6928248d495ce4172dabed18 /common/zlib.cpp | |
parent | ac387835e4527c1814919093b4e4bc9798d5742d (diff) | |
parent | 6716fa39a6fb2a3925576288c256688c5aadd7e9 (diff) | |
download | scummvm-rg350-6e2d567bca53b6ffee771b4105e2e73dbd73f5b4.tar.gz scummvm-rg350-6e2d567bca53b6ffee771b4105e2e73dbd73f5b4.tar.bz2 scummvm-rg350-6e2d567bca53b6ffee771b4105e2e73dbd73f5b4.zip |
Merge branch 'master' of https://github.com/scummvm/scummvm into mortevielle
Conflicts:
engines/engines.mk
Diffstat (limited to 'common/zlib.cpp')
-rw-r--r-- | common/zlib.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/zlib.cpp b/common/zlib.cpp index fc8f351054..920338e57e 100644 --- a/common/zlib.cpp +++ b/common/zlib.cpp @@ -392,17 +392,21 @@ public: #endif // USE_ZLIB SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped, uint32 knownSize) { -#if defined(USE_ZLIB) if (toBeWrapped) { uint16 header = toBeWrapped->readUint16BE(); bool isCompressed = (header == 0x1F8B || ((header & 0x0F00) == 0x0800 && header % 31 == 0)); toBeWrapped->seek(-2, SEEK_CUR); - if (isCompressed) + if (isCompressed) { +#if defined(USE_ZLIB) return new GZipReadStream(toBeWrapped, knownSize); - } +#else + delete toBeWrapped; + return NULL; #endif + } + } return toBeWrapped; } @@ -415,4 +419,4 @@ WriteStream *wrapCompressedWriteStream(WriteStream *toBeWrapped) { } -} // End of namespace Common +} // End of namespace Common |