diff options
author | Travis Howell | 2004-10-03 05:34:48 +0000 |
---|---|---|
committer | Travis Howell | 2004-10-03 05:34:48 +0000 |
commit | 39645f5bef3931ea93e1aff6b42935cb841ba7ad (patch) | |
tree | 7607e3b240b534b3895ec7c069933b62ba15a06e /scumm | |
parent | ac58d5c307e753b948d9bd89bf3066f70d5f10f7 (diff) | |
download | scummvm-rg350-39645f5bef3931ea93e1aff6b42935cb841ba7ad.tar.gz scummvm-rg350-39645f5bef3931ea93e1aff6b42935cb841ba7ad.tar.bz2 scummvm-rg350-39645f5bef3931ea93e1aff6b42935cb841ba7ad.zip |
Ooops
svn-id: r15387
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v90he.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index b9b0a539c3..171d52d508 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)); } |