diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index a22bbae8db..b0154ad776 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -532,7 +532,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas * so don't re-sort for them. */ // /* We're using sections, so use the section name as the top-level // * sort. */ - if( so != SORT_BPM ) + if( so != SORT_GRADE && so != SORT_BPM ) SortSongPointerArrayBySectionName(arraySongs, so); // make WheelItemDatas with sections diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 2ba4b5a11a..7b799924eb 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1298,11 +1298,11 @@ void SortSongPointerArrayByBPM( vector &arraySongPointers ) void AppendOctal( int n, int digits, CString &out ) { - for( int p = digits; p >= 0; --p ) + for( int p = digits-1; p >= 0; --p ) { const int shift = p*3; int n2 = (n >> shift) & 0x7; - out.insert( out.begin(), (char) n2 ); + out.insert( out.end(), (char) (n2+'0') ); } } @@ -1324,7 +1324,7 @@ void SortSongPointerArrayByGrade( vector &arraySongPointers ) CString foo; foo.reserve(256); - for( int g=NUM_GRADES-1; g>GRADE_NO_DATA; g-- ) + for( int g=GRADE_TIER_1; g<=GRADE_NO_DATA; ++g ) { int n = pSong->GetNumNotesWithGrade( (Grade)g ); AppendOctal( n, 3, foo );