From a48ee7d111cb0d2a096d091b13e374275d3ab139 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 3 Jul 2019 20:26:27 +0200 Subject: HDB: Safer version of AI::moveEnts() --- engines/hdb/ai-funcs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 08b72ee049..e7cbfe9bd5 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1844,8 +1844,8 @@ void AI::moveEnts() { } // Call aiAction for all other Entities - for (Common::Array::iterator it = _ents->begin(); it != _ents->end(); it++) { - e = (*it); + for (int i = 0; i < _ents->size(); i++) { + e = _ents->operator[](i); if (e->aiAction) { // NPC Touchplate Counter if (e != _player && e->touchpWait) { -- cgit v1.2.3