[Scummvm-cvs-logs] scummvm master -> 16ced34bc2a21c99f775103008da0f1caf99e26d

dreammaster dreammaster at scummvm.org
Thu Mar 5 02:55:49 CET 2015


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:
16ced34bc2 MADS: Fix assert when there are more than 5 talk options available


Commit: 16ced34bc2a21c99f775103008da0f1caf99e26d
    https://github.com/scummvm/scummvm/commit/16ced34bc2a21c99f775103008da0f1caf99e26d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-03-04T20:54:35-05:00

Commit Message:
MADS: Fix assert when there are more than 5 talk options available

Changed paths:
    engines/mads/user_interface.cpp



diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp
index 929390a..a53ab31 100644
--- a/engines/mads/user_interface.cpp
+++ b/engines/mads/user_interface.cpp
@@ -843,10 +843,11 @@ void UserInterface::emptyConversationList() {
 }
 
 void UserInterface::addConversationMessage(int vocabId, const Common::String &msg) {
-	assert(_talkStrings.size() < 5);
-
-	_talkStrings.push_back(msg);
-	_talkIds.push_back(vocabId);
+	// Only allow a maximum of 5 talk entries to be displayed
+	if (_talkStrings.size() < 5) {
+		_talkStrings.push_back(msg);
+		_talkIds.push_back(vocabId);
+	}
 }
 
 void UserInterface::loadInventoryAnim(int objectId) {






More information about the Scummvm-git-logs mailing list