From 8533a28987936e9554dfc3dbbd3bf7e7799de9d4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 28 Jul 2003 23:38:42 +0000 Subject: [PATCH] fix potential crash --- stepmania/src/Course.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 592515c0cb..2068ca11e7 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -871,10 +871,10 @@ void Course::UpdateCourseStats() vector ci; GetCourseInfo( GAMESTATE->GetCurrentStyleDef()->m_NotesType, ci ); - for(i = 0; i < m_entries.size(); i++) + for(i = 0; i < ci.size(); i++) { // courses with random/players best-worst songs should go at the end - if (m_entries[i].type != Entry::fixed) + if (m_entries[ ci[i].CourseIndex ].type != Entry::fixed) { SortOrder_AvgDifficulty = 9999999; // large number SortOrder_Ranking = 3;