Skip to content

Commit

Permalink
SCI32: Fix off-by-one error
Browse files Browse the repository at this point in the history
CID 1361599.
  • Loading branch information
csnover committed Sep 30, 2016
1 parent 181676a commit 7884905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/sci/engine/klists.cpp
Expand Up @@ -554,7 +554,7 @@ reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) {

++list->numRecursions;

if (list->numRecursions > ARRAYSIZE(list->nextNodes)) {
if (list->numRecursions >= ARRAYSIZE(list->nextNodes)) {
error("Too much recursion in kListEachElementDo");
}

Expand Down

0 comments on commit 7884905

Please sign in to comment.