From 39645f5bef3931ea93e1aff6b42935cb841ba7ad Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 3 Oct 2004 05:34:48 +0000 Subject: [PATCH] Ooops svn-id: r15387 --- scumm/script_v90he.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index b9b0a539c36..171d52d508e 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -1073,14 +1073,13 @@ void ScummEngine_v90he::o90_findAllObjectsWithClassOf() { num = getStackList(args, ARRAYSIZE(args)); int room = pop(); - int i = 1; + int j = 1; if (room != _currentRoom) warning("o90_findAllObjectsWithClassOf: current room is not %d", room); writeVar(0, 0); defineArray(0, kDwordArray, 0, 0, 0, _numLocalObjects + 1); - - while (i < _numLocalObjects) { + for (int i = 1; i < _numLocalObjects; i++) { cond = 1; tmp = num; while (--tmp >= 0) { @@ -1091,10 +1090,9 @@ void ScummEngine_v90he::o90_findAllObjectsWithClassOf() { } if (cond) - writeArray(0, 0, i, _objs[i].obj_nr); - i++; + writeArray(0, 0, j++, _objs[i].obj_nr); } - writeArray(0, 0, 0, i); + writeArray(0, 0, 0, j); push(readVar(0)); }