aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRetro-Junk2016-09-27 23:49:27 +0300
committerEugene Sandulenko2016-09-27 22:55:12 +0200
commitbceeee08d0c8a0d83ad432bbc00e6ddc72438fff (patch)
tree6b9e4d95b5fb29d842e6bdef6d38cdcb2ec5409f
parent5de239e3c631943c37f3de959116e9749efa6098 (diff)
downloadscummvm-rg350-bceeee08d0c8a0d83ad432bbc00e6ddc72438fff.tar.gz
scummvm-rg350-bceeee08d0c8a0d83ad432bbc00e6ddc72438fff.tar.bz2
scummvm-rg350-bceeee08d0c8a0d83ad432bbc00e6ddc72438fff.zip
FULLPIPE: Fix counter in Scene::objectList_sortByPriority
-rw-r--r--engines/fullpipe/scene.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index b03540a5ee..abbb90dba9 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -509,7 +509,6 @@ template<typename T>
void Scene::objectList_sortByPriority(Common::Array<T *> &list, int startIndex) {
if (list.size() > startIndex) {
int lastIndex = list.size() - 1;
- int count = lastIndex - startIndex;
bool changed;
do {
changed = false;
@@ -524,7 +523,7 @@ void Scene::objectList_sortByPriority(Common::Array<T *> &list, int startIndex)
} else
refElement = curElement;
}
- count--;
+ lastIndex--;
} while (changed);
}
}