diff options
author | Filippos Karapetis | 2014-12-19 13:32:51 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-12-19 13:32:51 +0200 |
commit | a4c5e140e20a9dd1f23ca19c7449395726b7ec3b (patch) | |
tree | 6cafed74e960875475ad1d4a9a8b1805636f023a /engines/zvision/file/zfs_archive.cpp | |
parent | e0cb8f52f73ba927d5bf24c9b44f6d28743509df (diff) | |
parent | 5fb33ee5e7c99f76ba9560b56177041d19fb602e (diff) | |
download | scummvm-rg350-a4c5e140e20a9dd1f23ca19c7449395726b7ec3b.tar.gz scummvm-rg350-a4c5e140e20a9dd1f23ca19c7449395726b7ec3b.tar.bz2 scummvm-rg350-a4c5e140e20a9dd1f23ca19c7449395726b7ec3b.zip |
Merge pull request #549 from Marisa-Chan/master
ZVISION: Delete unused code
Diffstat (limited to 'engines/zvision/file/zfs_archive.cpp')
-rw-r--r-- | engines/zvision/file/zfs_archive.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/zvision/file/zfs_archive.cpp b/engines/zvision/file/zfs_archive.cpp index 9b55a366ed..3a385cd8fd 100644 --- a/engines/zvision/file/zfs_archive.cpp +++ b/engines/zvision/file/zfs_archive.cpp @@ -31,6 +31,7 @@ namespace ZVision { ZfsArchive::ZfsArchive(const Common::String &fileName) : _fileName(fileName) { Common::File zfsFile; + memset(&_header, 0, sizeof(_header)); if (!zfsFile.open(_fileName)) { warning("ZFSArchive::ZFSArchive(): Could not find the archive file"); @@ -140,7 +141,7 @@ Common::SeekableReadStream *ZfsArchive::createReadStreamForMember(const Common:: byte *buffer = (byte *)malloc(entryHeader->size); zfsArchive.read(buffer, entryHeader->size); // Decrypt the data in place - if (_header.xorKey != 0) + if (_header.xorKey[0] + _header.xorKey[1] + _header.xorKey[2] + _header.xorKey[3] != 0) unXor(buffer, entryHeader->size, _header.xorKey); return new Common::MemoryReadStream(buffer, entryHeader->size, DisposeAfterUse::YES); |