aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
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);
}
}