diff options
author | Thanasis Antoniou | 2019-09-05 13:13:21 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-09-05 13:17:53 +0300 |
commit | ac912a5023c83c4ac87a6e77c213f99d501cdd6b (patch) | |
tree | 96dd1b4ca982bfdee6551401b8b3c3ba247d58ae /engines/bladerunner/actor_clues.cpp | |
parent | 541689eeb2f4ffd70ae7989e8313b2928de3ef11 (diff) | |
download | scummvm-rg350-ac912a5023c83c4ac87a6e77c213f99d501cdd6b.tar.gz scummvm-rg350-ac912a5023c83c4ac87a6e77c213f99d501cdd6b.tar.bz2 scummvm-rg350-ac912a5023c83c4ac87a6e77c213f99d501cdd6b.zip |
BLADERUNNER: Revert previous changes in clues listing
Keep the important bug fix which was in KIASectionSuspects::populateAcquiredClues
Some of the changes in the previous commit were due to confusing the role of the getClueIdByIndex method
Diffstat (limited to 'engines/bladerunner/actor_clues.cpp')
-rw-r--r-- | engines/bladerunner/actor_clues.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/bladerunner/actor_clues.cpp b/engines/bladerunner/actor_clues.cpp index 4946113713..462cdc1bc3 100644 --- a/engines/bladerunner/actor_clues.cpp +++ b/engines/bladerunner/actor_clues.cpp @@ -318,7 +318,9 @@ int ActorClues::getCount() const { } int ActorClues::getClueIdByIndex(int index) const { - if (index < 0) { + assert(index < _count); + + if (index < 0 || index >= _count) { return -1; } return _clues[index].clueId; |