fix out of bounds HighScoreList access

This commit is contained in:
Chris Danford
2005-05-03 03:48:47 +00:00
parent 348c6f6f5a
commit 2d6927c46c
+1 -1
View File
@@ -354,7 +354,7 @@ void ScreenNameEntryTraditional::Init()
PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList(pCourse,pTrail) :
PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSong,pSteps);
for( unsigned h=0; h<hsl.vHighScores.size(); h++ )
for( unsigned h=0; h<hsl.vHighScores.size() && h<PREFSMAN->m_iMaxHighScoresPerListForMachine; h++ )
{
const HighScore &hs = hsl.vHighScores[h];
if( hs.sName == RANKING_TO_FILL_IN_MARKER[p] &&