From bceeee08d0c8a0d83ad432bbc00e6ddc72438fff Mon Sep 17 00:00:00 2001 From: Retro-Junk Date: Tue, 27 Sep 2016 23:49:27 +0300 Subject: FULLPIPE: Fix counter in Scene::objectList_sortByPriority --- engines/fullpipe/scene.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/fullpipe') 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 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); } } -- cgit v1.2.3