fix out-of-bounds access. VC2005 debug catches this, but VC2003 didn't.

This commit is contained in:
Chris Danford
2007-09-04 05:24:19 +00:00
parent 5a73f14767
commit bc21adef29
+2 -1
View File
@@ -500,7 +500,8 @@ unsigned long MidiFileIn :: getNextEvent( std::vector<unsigned char> *event, uns
TempoChange tempoEvent = tempoEvents_[ trackTempoIndex_[track] ];
if( trackCounters_[track] >= tempoEvent.count )
{
trackTempoIndex_[track]++;
if( trackTempoIndex_[track] < tempoEvents_.size()-1 )
trackTempoIndex_[track]++;
tickSeconds_[track] = tempoEvent.tickSeconds;
}
}