diff options
-rw-r--r-- | engines/hdb/ai-lists.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index 95bfe04d94..ab445fd583 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -449,7 +449,7 @@ CallbackDef allCallbacks[] = { }; void AI::addCallback(CallbackType type, int x, int y, int delay) { - for(int i= kMaxCallbacks; i >= 0; i--) + for (int i = kMaxCallbacks - 1; i >= 0; i--) if (_callbacks[i].type == NO_FUNCTION) { _callbacks[i].type = type; _callbacks[i].x = x; |