[Scummvm-cvs-logs] scummvm master -> 16f2c5cdb699906379016e95f9bf2ceac50980b1
eriktorbjorn
eriktorbjorn at telia.com
Sun Jan 15 00:06:37 CET 2012
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6530da3feb LURE: Move readByte() call out of assert()
16f2c5cdb6 DRACI: Move readByte() and readUint32LE() out of assert()
Commit: 6530da3feb294eaad413635e819286495fc017a3
https://github.com/scummvm/scummvm/commit/6530da3feb294eaad413635e819286495fc017a3
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-01-14T14:58:59-08:00
Commit Message:
LURE: Move readByte() call out of assert()
Changed paths:
engines/lure/hotspots.cpp
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index 2f6d0f2..c7e7e81 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -2334,9 +2334,11 @@ void Hotspot::saveToStream(Common::WriteStream *stream) {
void Hotspot::loadFromStream(Common::ReadStream *stream) {
if (_data)
_data->npcSchedule.loadFromStream(stream);
- else
+ else {
// Dummy read of terminator for empty actions list
- assert(stream->readByte() == 0xff);
+ byte dummy = stream->readByte();
+ assert(dummy == 0xff);
+ }
_pathFinder.loadFromStream(stream);
Commit: 16f2c5cdb699906379016e95f9bf2ceac50980b1
https://github.com/scummvm/scummvm/commit/16f2c5cdb699906379016e95f9bf2ceac50980b1
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-01-14T15:04:28-08:00
Commit Message:
DRACI: Move readByte() and readUint32LE() out of assert()
Changed paths:
engines/draci/barchive.cpp
diff --git a/engines/draci/barchive.cpp b/engines/draci/barchive.cpp
index 1540732..31dfe62 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;
More information about the Scummvm-git-logs
mailing list