aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2010-06-02 17:04:55 +0000
committerMatthew Hoops2010-06-02 17:04:55 +0000
commit14a4d8f8b06abb095cf6c9db718b4e26c266e78b (patch)
treef58b2582349bc9f45e47d3e78e48d9d6abaa9a2f
parentc4bdca72d7fcd837e51a449ff68a1d93977a0d18 (diff)
downloadscummvm-rg350-14a4d8f8b06abb095cf6c9db718b4e26c266e78b.tar.gz
scummvm-rg350-14a4d8f8b06abb095cf6c9db718b4e26c266e78b.tar.bz2
scummvm-rg350-14a4d8f8b06abb095cf6c9db718b4e26c266e78b.zip
Fix a regression from r49377 - we should be checking against code in addition to index for duplicate MLST's.
svn-id: r49395
-rw-r--r--engines/mohawk/video.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index ed1fc6b2c6..a45a4294c8 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -246,11 +246,11 @@ void VideoManager::activateMLST(uint16 mlstId, uint16 card) {
// We've found a match, add it
if (mlstRecord.index == mlstId) {
- // Make sure we don't have a duplicate
+ // Make sure we don't have any duplicates
for (uint32 j = 0; j < _mlstRecords.size(); j++)
- if (_mlstRecords[j].index == mlstId) {
+ if (_mlstRecords[j].index == mlstRecord.index || _mlstRecords[j].code == mlstRecord.code) {
_mlstRecords.remove_at(j);
- break;
+ j--;
}
_mlstRecords.push_back(mlstRecord);