diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/m4/converse.cpp | 6 | ||||
-rw-r--r-- | engines/m4/saveload.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp index 4630d2e2d6..bdce7928ac 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 aa35385bfe..a7615fa4b6 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); |