diff options
author | Paul Gilbert | 2015-03-04 20:54:35 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-03-04 20:54:35 -0500 |
commit | 16ced34bc2a21c99f775103008da0f1caf99e26d (patch) | |
tree | aa8a0933685c720b2b39df9dabd8620f0203e1c4 /engines | |
parent | 0780ec95c2a035d122e2afba1beb2143033943a6 (diff) | |
download | scummvm-rg350-16ced34bc2a21c99f775103008da0f1caf99e26d.tar.gz scummvm-rg350-16ced34bc2a21c99f775103008da0f1caf99e26d.tar.bz2 scummvm-rg350-16ced34bc2a21c99f775103008da0f1caf99e26d.zip |
MADS: Fix assert when there are more than 5 talk options available
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/user_interface.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 929390a073..a53ab31968 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) { |