From 16f2c5cdb699906379016e95f9bf2ceac50980b1 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 15 Jan 2012 00:04:28 +0100 Subject: DRACI: Move readByte() and readUint32LE() out of assert() --- engines/draci/barchive.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3