aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-08-28 20:44:25 -0500
committerColin Snover2016-09-29 19:39:16 -0500
commit78849053ca8abf203fe3f17972581416e86d334d (patch)
tree99806d21b2ed23a5ee5e787de5a6bb41bad8f72b
parent181676a0d515ab2ae4e7930bea7658e00f51d5d0 (diff)
downloadscummvm-rg350-78849053ca8abf203fe3f17972581416e86d334d.tar.gz
scummvm-rg350-78849053ca8abf203fe3f17972581416e86d334d.tar.bz2
scummvm-rg350-78849053ca8abf203fe3f17972581416e86d334d.zip
SCI32: Fix off-by-one error
CID 1361599.
-rw-r--r--engines/sci/engine/klists.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index e780d3cdc3..db6ffb1310 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -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");
}