Don't crash in selection extension

This commit is contained in:
Matthias Neeracher 2008-03-24 22:57:06 +00:00
parent 920e7aa0fd
commit d3df79a27e

View File

@ -88,8 +88,7 @@ static VLSong sPasteboard;
if (fSelEnd > -1) { if (fSelEnd > -1) {
firstSection = song->fMeasures[fSelStart].fPropIdx; firstSection = song->fMeasures[fSelStart].fPropIdx;
lastSection = fSelEnd > fSelStart+1 ? lastSection = fSelEnd==fSelStart ? firstSection : song->fMeasures[fSelEnd-1].fPropIdx;
song->fMeasures[fSelEnd].fPropIdx : firstSection;
} else { } else {
firstSection = 0; firstSection = 0;
lastSection = song->fMeasures.back().fPropIdx; lastSection = song->fMeasures.back().fPropIdx;