From 02dc122958577a2a6e42b308f288f312751e1b40 Mon Sep 17 00:00:00 2001 From: Jared Roberts Date: Fri, 11 Oct 2002 09:28:00 +0000 Subject: [PATCH] Fix off-by-two sign error in determining how many songs are not visible in the list. Also, never show "1 more...", just show the song itself instead. One of those bugs that's irked me for awhile that I think I'm the only one on the planet who even noticed... --- stepmania/src/MusicList.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/MusicList.cpp b/stepmania/src/MusicList.cpp index f7e1a4433c..5e6b703b32 100644 --- a/stepmania/src/MusicList.cpp +++ b/stepmania/src/MusicList.cpp @@ -50,9 +50,10 @@ void MusicList::AddSongsToGroup(const CArray &Songs) if( iIndex >= Songs.GetSize() ) continue; - if( c == TITLES_COLUMNS-1 && r == TITLES_ROWS-1 ) + int iSongsLen = Songs.GetSize(); + if( (c == TITLES_COLUMNS-1) && (r == TITLES_ROWS-1) && (iSongsLen != TITLES_COLUMNS*TITLES_ROWS) ) { - sText += ssprintf( "%d more.....", Songs.GetSize() - TITLES_COLUMNS * TITLES_ROWS - 1 ); + sText += ssprintf( "%d more.....", iSongsLen - TITLES_COLUMNS * TITLES_ROWS + 1 ); continue; }