From 3c44d05daaf22886c932aa053f915316e7d6f9dd Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Fri, 28 Jun 2019 02:37:14 +0530 Subject: HDB: Fix initialization error --- engines/hdb/ai-lists.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3