diff options
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; |