aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-05 00:18:01 -0500
committerrichiesams2013-08-05 00:18:01 -0500
commit65b5a2797b29dc4c0ca9a1bd2bd2e92083deb081 (patch)
treea29943367cbc253c8b592e2a5d2c2eb57278bb73 /engines
parent6515e2d31bbbad55168b8b27142cdc50f366795d (diff)
downloadscummvm-rg350-65b5a2797b29dc4c0ca9a1bd2bd2e92083deb081.tar.gz
scummvm-rg350-65b5a2797b29dc4c0ca9a1bd2bd2e92083deb081.tar.bz2
scummvm-rg350-65b5a2797b29dc4c0ca9a1bd2bd2e92083deb081.zip
ZVISION: Fix index out of range error
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/utility.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/zvision/utility.h b/engines/zvision/utility.h
index 8974809f97..3348a43fe3 100644
--- a/engines/zvision/utility.h
+++ b/engines/zvision/utility.h
@@ -71,7 +71,7 @@ void removeDuplicateEntries(Common::Array<T> &container) {
Common::sort(container.begin(), container.end());
for (uint i = 0; i + 1 < container.size(); i++) {
- while (container[i] == container[i + 1]) {
+ while (i + 1 < container.size() && container[i] == container[i + 1]) {
container.remove_at(i + 1);
}
}