diff options
author | Eugene Sandulenko | 2019-07-03 20:26:27 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:10 +0200 |
commit | a48ee7d111cb0d2a096d091b13e374275d3ab139 (patch) | |
tree | fdb988fcaa6aff0e6c833d17da32e14e9c7b45d5 /engines | |
parent | 95c36ed358fdfe598e2e0fae3c4757d22b541367 (diff) | |
download | scummvm-rg350-a48ee7d111cb0d2a096d091b13e374275d3ab139.tar.gz scummvm-rg350-a48ee7d111cb0d2a096d091b13e374275d3ab139.tar.bz2 scummvm-rg350-a48ee7d111cb0d2a096d091b13e374275d3ab139.zip |
HDB: Safer version of AI::moveEnts()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 4 |
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) { |