From d3df79a27e6b894a5064990ad37e058b7edfe456 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 24 Mar 2008 22:57:06 +0000 Subject: [PATCH] Don't crash in selection extension --- Sources/VLSheetViewSelection.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/VLSheetViewSelection.mm b/Sources/VLSheetViewSelection.mm index 11605e0..7d1a424 100644 --- a/Sources/VLSheetViewSelection.mm +++ b/Sources/VLSheetViewSelection.mm @@ -88,8 +88,7 @@ static VLSong sPasteboard; if (fSelEnd > -1) { firstSection = song->fMeasures[fSelStart].fPropIdx; - lastSection = fSelEnd > fSelStart+1 ? - song->fMeasures[fSelEnd].fPropIdx : firstSection; + lastSection = fSelEnd==fSelStart ? firstSection : song->fMeasures[fSelEnd-1].fPropIdx; } else { firstSection = 0; lastSection = song->fMeasures.back().fPropIdx;