From 06aed83dbed7cfdda5b376b56b35168ff3fdd2e2 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 21 Jul 2003 20:11:13 +0000 Subject: [PATCH] fixes --- stepmania/src/BPMDisplay.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/BPMDisplay.cpp b/stepmania/src/BPMDisplay.cpp index 3986093847..e2d86ba3b1 100644 --- a/stepmania/src/BPMDisplay.cpp +++ b/stepmania/src/BPMDisplay.cpp @@ -96,7 +96,7 @@ void BPMDisplay::SetBPMRange( const vector &BPMS ) bool AllIdentical = true; for( i = 0; i < BPMS.size(); ++i ) { - if( i > 0 && m_BPMS[i] != m_BPMS[i-1] ) + if( i > 0 && BPMS[i] != BPMS[i-1] ) AllIdentical = false; m_BPMS.push_back(BPMS[i]); @@ -104,7 +104,7 @@ void BPMDisplay::SetBPMRange( const vector &BPMS ) m_BPMS.push_back(BPMS[i]); /* hold */ } - m_iCurrentBPM = min(1u, sizeof(m_BPMS)); /* start on the first hold */ + m_iCurrentBPM = min(1u, m_BPMS.size()); /* start on the first hold */ m_fBPMFrom = BPMS[0]; m_fBPMTo = BPMS[0]; m_fPercentInState = 1; @@ -177,6 +177,7 @@ void BPMDisplay::SetBPM( const Song* pSong ) void BPMDisplay::SetBPM( const Course* pCourse ) { + ASSERT( pCourse ); vector vSongs; vector vNotes; vector vsModifiers;