From de0783842a91390dfead1205deb51d27b541278e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 8 Feb 2005 01:05:02 +0000 Subject: [PATCH] fix Echo hanging --- stepmania/src/NoteDataUtil.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index c1baa1b183..d384e822e6 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -1245,6 +1245,10 @@ void NoteDataUtil::Echo( NoteData &inout, int iStartIndex, int iEndIndex ) const int rows_per_interval = BeatToNoteRow( 0.5f ); iStartIndex = Quantize( iStartIndex, rows_per_interval ); + /* Clamp iEndIndex to the last real tap note. Otherwise, we'll keep adding + * echos of our echos all the way up to MAX_TAP_ROW. */ + iEndIndex = min( iEndIndex, inout.GetLastRow() )+1; + // window is one beat wide and slides 1/2 a beat at a time FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( inout, r, iStartIndex, iEndIndex ) {