aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-03 20:26:27 +0200
committerEugene Sandulenko2019-09-03 17:17:10 +0200
commita48ee7d111cb0d2a096d091b13e374275d3ab139 (patch)
treefdb988fcaa6aff0e6c833d17da32e14e9c7b45d5
parent95c36ed358fdfe598e2e0fae3c4757d22b541367 (diff)
downloadscummvm-rg350-a48ee7d111cb0d2a096d091b13e374275d3ab139.tar.gz
scummvm-rg350-a48ee7d111cb0d2a096d091b13e374275d3ab139.tar.bz2
scummvm-rg350-a48ee7d111cb0d2a096d091b13e374275d3ab139.zip
HDB: Safer version of AI::moveEnts()
-rw-r--r--engines/hdb/ai-funcs.cpp4
1 files 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<AIEntity *>::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) {