From 3974fa9a218c88184e0ecb42b9a259b26e0dae33 Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Sat, 4 Jun 2005 23:20:47 +0000 Subject: [PATCH] Prevent cryptic error when failing with a course that doesn't have a group name. --- stepmania/src/SongManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 3942a41cae..15f1c05216 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -399,9 +399,8 @@ RageColor SongManager::GetCourseGroupColor( const CString &sCourseGroupName ) if( m_sCourseGroupNames[i] == sCourseGroupName ) break; } - ASSERT_M( i != m_sCourseGroupNames.size(), sCourseGroupName ); // this is not a valid group - - return COURSE_GROUP_COLOR.GetValue( i%NUM_COURSE_GROUP_COLORS ); + ASSERT_M( i != m_sCourseGroupNames.size(), "Course: '" + sCourseGroupName + "' is not a valid group." ); // this is not a valid group + return COURSE_GROUP_COLOR.GetValue( i%NUM_COURSE_GROUP_COLORS.GetValue() ); } RageColor SongManager::GetCourseColor( const Course* pCourse )