diff options
author | uruk | 2014-04-21 22:43:20 +0200 |
---|---|---|
committer | uruk | 2014-04-21 22:43:20 +0200 |
commit | 33920b734ac19b04a487314254b8a766d21b54f6 (patch) | |
tree | a7687d4852585145c79f0484a7dd302cbc323bf8 /engines/avalanche | |
parent | 2cd896b1d62dd304448d521a9fd9920dc84937e3 (diff) | |
download | scummvm-rg350-33920b734ac19b04a487314254b8a766d21b54f6.tar.gz scummvm-rg350-33920b734ac19b04a487314254b8a766d21b54f6.tar.bz2 scummvm-rg350-33920b734ac19b04a487314254b8a766d21b54f6.zip |
AVALANCHE: Fix out-of-bounds indexing issue.
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/highscore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/avalanche/highscore.cpp b/engines/avalanche/highscore.cpp index bbe92e7f8a..5f47aeb894 100644 --- a/engines/avalanche/highscore.cpp +++ b/engines/avalanche/highscore.cpp @@ -42,7 +42,7 @@ void HighScore::displayHighScores() { void HighScore::saveHighScores() { int firstSmaller = 0; - while ((_data[firstSmaller]._score >= _vm->_score) && (firstSmaller < 12)) + while ((firstSmaller < 12) && (_data[firstSmaller]._score >= _vm->_score)) firstSmaller++; if (firstSmaller < 12) { |