[Scummvm-cvs-logs] scummvm master -> 9caed13d906b852cd90033a2df304d19f0f0e38c
dreammaster
dreammaster at scummvm.org
Sun Mar 15 21:19:41 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:
9caed13d90 MADS: Better handling for removing sprite sets
Commit: 9caed13d906b852cd90033a2df304d19f0f0e38c
https://github.com/scummvm/scummvm/commit/9caed13d906b852cd90033a2df304d19f0f0e38c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-03-15T16:18:38-04:00
Commit Message:
MADS: Better handling for removing sprite sets
Changed paths:
engines/mads/sprites.cpp
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index 6488add..67d5e20 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -402,10 +402,13 @@ void SpriteSets::remove(int idx) {
} else if (idx >= 0) {
delete (*this)[idx];
- if (idx == ((int)size() - 1))
- remove_at(size() - 1);
- else
+ if (idx < ((int)size() - 1)) {
(*this)[idx] = nullptr;
+ } else {
+ do {
+ remove_at(size() - 1);
+ } while (size() > 0 && (*this)[size() - 1] == nullptr);
+ }
}
}
More information about the Scummvm-git-logs
mailing list