aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sequences_lok.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-11-01 16:25:04 +0100
committerJohannes Schickel2011-11-01 16:35:11 +0100
commit57ca48d5470eac957c9932c45ad8807d5545b771 (patch)
tree7bcd984ce197ee8e6528013d5790632d7657e1de /engines/kyra/sequences_lok.cpp
parent5cc76e8d71cc3082b93c13cabf37f7306e4574e2 (diff)
downloadscummvm-rg350-57ca48d5470eac957c9932c45ad8807d5545b771.tar.gz
scummvm-rg350-57ca48d5470eac957c9932c45ad8807d5545b771.tar.bz2
scummvm-rg350-57ca48d5470eac957c9932c45ad8807d5545b771.zip
KYRA: Fix Common::List::erase usage.
Thanks to Tron for pointing that out.
Diffstat (limited to 'engines/kyra/sequences_lok.cpp')
-rw-r--r--engines/kyra/sequences_lok.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 2de0565a74..99ae2ad7b3 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -1322,7 +1322,7 @@ void KyraEngine_LoK::seq_playCredits() {
_screen->copyRegion(0, 32, 0, 32, 320, 128, 4, 2, Screen::CR_NO_P_CHECK);
bottom = 0;
- for (CreditsLineList::iterator it = lines.begin(); it != lines.end(); ++it) {
+ for (CreditsLineList::iterator it = lines.begin(); it != lines.end();) {
if (it->y < 0) {
it = lines.erase(it);
continue;
@@ -1338,6 +1338,8 @@ void KyraEngine_LoK::seq_playCredits() {
it->y--;
if (it->y > bottom)
bottom = it->y;
+
+ ++it;
}
_screen->copyRegion(0, 32, 0, 32, 320, 128, 2, 0, Screen::CR_NO_P_CHECK);