From 7b377d836d96e0dcd8f63d0fa0e57e0dd554fa6b Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Mon, 11 Jul 2011 12:27:12 -0400 Subject: [PATCH] Stop array out-of-bounds exception. Alright, that's it: I'm getting cppcheck. --- src/SongUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SongUtil.cpp b/src/SongUtil.cpp index 506b489b0e..a8dff2b3f1 100644 --- a/src/SongUtil.cpp +++ b/src/SongUtil.cpp @@ -475,7 +475,7 @@ void SongUtil::SortSongPointerArrayByGrades( vector &vpSongsInOut, bool b { Song *pSong = vpSongsInOut[i]; - int iCounts[NUM_Grade]; + int iCounts[Grade_NoData + 1]; const Profile *pProfile = PROFILEMAN->GetMachineProfile(); ASSERT( pProfile ); pProfile->GetGrades( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType, iCounts );