diff options
author | Marisa-Chan | 2014-12-19 15:30:03 +0600 |
---|---|---|
committer | Marisa-Chan | 2014-12-19 15:30:03 +0600 |
commit | 30212e4579e9f811f46cfadc5899c4d21cd513ed (patch) | |
tree | 4ca140da642a7357c64930bbc3b5e425b6d1a76e /engines | |
parent | f4fe0b008fa564a59dddfc59af9385fd3cd958d0 (diff) | |
download | scummvm-rg350-30212e4579e9f811f46cfadc5899c4d21cd513ed.tar.gz scummvm-rg350-30212e4579e9f811f46cfadc5899c4d21cd513ed.tar.bz2 scummvm-rg350-30212e4579e9f811f46cfadc5899c4d21cd513ed.zip |
ZVISION: Fix array compared against 0 (CID 1109648)
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/file/zfs_archive.cpp | 2 | ||||
-rw-r--r-- | engines/zvision/file/zfs_archive.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/zvision/file/zfs_archive.cpp b/engines/zvision/file/zfs_archive.cpp index 9b55a366ed..0c076a798b 100644 --- a/engines/zvision/file/zfs_archive.cpp +++ b/engines/zvision/file/zfs_archive.cpp @@ -140,7 +140,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); diff --git a/engines/zvision/file/zfs_archive.h b/engines/zvision/file/zfs_archive.h index 571591a6d1..fe0221416d 100644 --- a/engines/zvision/file/zfs_archive.h +++ b/engines/zvision/file/zfs_archive.h @@ -39,7 +39,7 @@ struct ZfsHeader { uint32 maxNameLength; uint32 filesPerBlock; uint32 fileCount; - byte xorKey[4]; + uint8 xorKey[4]; uint32 fileSectionOffset; }; |