aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorPaul Gilbert2014-10-18 18:27:07 -0400
committerPaul Gilbert2014-10-18 18:27:07 -0400
commite06327e81aee35b9a523122637f79c9d0530c0bc (patch)
tree03a288c806abeb3885309069f41a6d32a45350a8 /engines/mads
parent7bdf48170a86fddca28350afac5b90981be0d9a0 (diff)
downloadscummvm-rg350-e06327e81aee35b9a523122637f79c9d0530c0bc.tar.gz
scummvm-rg350-e06327e81aee35b9a523122637f79c9d0530c0bc.tar.bz2
scummvm-rg350-e06327e81aee35b9a523122637f79c9d0530c0bc.zip
MADS: Minor clean up of sprite set removal
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/sprites.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index 6cb55aaeee..fd73930475 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -404,9 +404,9 @@ void SpriteSets::remove(int idx) {
delete (*this)[idx];
(*this)[idx] = nullptr;
} else {
- while (size() > 0 && (*this)[size() - 1] == nullptr) {
+ do {
remove_at(size() - 1);
- }
+ } while (size() > 0 && (*this)[size() - 1] == nullptr);
}
if (_assetCount > 0)