[Scummvm-cvs-logs] scummvm master -> 33920b734ac19b04a487314254b8a766d21b54f6

urukgit urukgit at users.noreply.github.com
Mon Apr 21 22:53:52 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
33920b734a AVALANCHE: Fix out-of-bounds indexing issue.


Commit: 33920b734ac19b04a487314254b8a766d21b54f6
    https://github.com/scummvm/scummvm/commit/33920b734ac19b04a487314254b8a766d21b54f6
Author: uruk (koppirnyo at gmail.com)
Date: 2014-04-21T22:43:20+02:00

Commit Message:
AVALANCHE: Fix out-of-bounds indexing issue.

Changed paths:
    engines/avalanche/highscore.cpp



diff --git a/engines/avalanche/highscore.cpp b/engines/avalanche/highscore.cpp
index bbe92e7..5f47aeb 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) {






More information about the Scummvm-git-logs mailing list