diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index b03540a5ee1..abbb90dba95 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -509,7 +509,6 @@ template void Scene::objectList_sortByPriority(Common::Array &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 &list, int startIndex) } else refElement = curElement; } - count--; + lastIndex--; } while (changed); } }