[Scummvm-cvs-logs] scummvm master -> 7356b83faf2fa04ca4d439cdb17314247f03e96d
dreammaster
dreammaster at scummvm.org
Thu Aug 4 14:40:11 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7356b83faf M4: Fix identified assert calls that had file reads inside them
Commit: 7356b83faf2fa04ca4d439cdb17314247f03e96d
https://github.com/scummvm/scummvm/commit/7356b83faf2fa04ca4d439cdb17314247f03e96d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-08-04T05:37:30-07:00
Commit Message:
M4: Fix identified assert calls that had file reads inside them
Changed paths:
engines/m4/converse.cpp
engines/m4/saveload.cpp
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp
index 4630d2e..bdce792 100644
--- a/engines/m4/converse.cpp
+++ b/engines/m4/converse.cpp
@@ -609,7 +609,7 @@ void Converse::loadConversation(const char *convName) {
// ----------------------------------------------------------------------------
// Entry action chunks
case CHUNK_CASN: // Conditional assign
- case CHUNK_ASGN: // Assign
+ case CHUNK_ASGN: { // Assign
curAction = new EntryAction();
if (debugFlag) debugCN(kDebugConversations, "ASGN chunk\n");
curAction->actionType = kAssignValue;
@@ -625,9 +625,11 @@ void Converse::loadConversation(const char *convName) {
}
curAction->targetOffset = convS->readUint32LE();
- assert(convS->readUint32LE() == kOpAssign);
+ int op = convS->readUint32LE();
+ assert(op == kOpAssign);
curAction->value = convS->readUint32LE();
break;
+ }
case CHUNK_CCGO: // Conditional go to entry
case CHUNK_CHDE: // Conditional hide entry
case CHUNK_CUHD: // Conditional unhide entry
diff --git a/engines/m4/saveload.cpp b/engines/m4/saveload.cpp
index aa35385..a7615fa 100644
--- a/engines/m4/saveload.cpp
+++ b/engines/m4/saveload.cpp
@@ -96,7 +96,8 @@ SaveGameList *SaveLoad::getSaves() {
result->push_back(Common::String());
} else {
// Skip over byte offset
- assert(saveFile->readUint32LE() < 0x100);
+ uint32 offset = saveFile->readUint32LE();
+ assert(offset < 0x100);
// Read in savegame name
saveFile->read(&saveName[0], MAX_SAVEGAME_NAME);
More information about the Scummvm-git-logs
mailing list