diff options
author | Torbjörn Andersson | 2012-01-15 00:04:28 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2012-01-15 00:04:28 +0100 |
commit | 16f2c5cdb699906379016e95f9bf2ceac50980b1 (patch) | |
tree | b4dc523f16d269e7508b6b387fbaac5b38f0fd9a | |
parent | 6530da3feb294eaad413635e819286495fc017a3 (diff) | |
download | scummvm-rg350-16f2c5cdb699906379016e95f9bf2ceac50980b1.tar.gz scummvm-rg350-16f2c5cdb699906379016e95f9bf2ceac50980b1.tar.bz2 scummvm-rg350-16f2c5cdb699906379016e95f9bf2ceac50980b1.zip |
DRACI: Move readByte() and readUint32LE() out of assert()
-rw-r--r-- | engines/draci/barchive.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/draci/barchive.cpp b/engines/draci/barchive.cpp index 154073250c..31dfe62dee 100644 --- a/engines/draci/barchive.cpp +++ b/engines/draci/barchive.cpp @@ -212,7 +212,8 @@ void BArchive::openArchive(const Common::String &path) { _files[i]._offset = fileOffset; // Offset of file from start - assert(_f.readByte() == 0 && + byte compressionType = _f.readByte(); + assert(compressionType == 0 && "Compression type flag is non-zero (file is compressed)"); _files[i]._crc = _f.readByte(); // CRC checksum of the file @@ -221,7 +222,8 @@ void BArchive::openArchive(const Common::String &path) { } // Last footer item should be equal to footerOffset - assert(reader.readUint32LE() == footerOffset && "Footer offset mismatch"); + uint32 footerOffset2 = reader.readUint32LE(); + assert(footerOffset2 == footerOffset && "Footer offset mismatch"); // Indicate that the archive has been successfully opened _opened = true; |