From 946ae85b5fda2bde33cefec522a6a627d0330b99 Mon Sep 17 00:00:00 2001 From: Chris Aiken Date: Fri, 15 Apr 2016 19:24:27 -0400 Subject: [PATCH] Fix for issue #2713, adjusted Note::setKey bounds to fix one-off-the-end error --- src/core/Note.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Note.cpp b/src/core/Note.cpp index 69497d22a33..674a150eda2 100644 --- a/src/core/Note.cpp +++ b/src/core/Note.cpp @@ -115,7 +115,7 @@ void Note::setPos( const MidiTime & pos ) void Note::setKey( const int key ) { - const int k = qBound( 0, key, NumKeys ); + const int k = qBound( 0, key, NumKeys - 1 ); m_key = k; }