From c09013010808248c04f77e840834370a6323f6c2 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sun, 9 Jul 2006 23:51:40 +0000 Subject: [PATCH] Fix splitting composite NoteData. --- stepmania/src/NoteDataUtil.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 1a7e168f0b..678a6c7f53 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -415,8 +415,11 @@ void NoteDataUtil::SplitCompositeNoteData( const NoteData &in, vector unsigned index = int( tn.pn ); DEBUG_ASSERT( index < NUM_PlayerNumber ); - if( out.size() <= index ) - out.resize( index + 1 ); + while( out.size() <= index ) + { + out.push_back( NoteData() ); + out.back().SetNumTracks( in.GetNumTracks() ); + } tn.pn = PLAYER_INVALID; out[index].SetTapNote( t, row, tn ); }