# HG changeset patch # User Chris Cannam # Date 1412003952 -3600 # Node ID eafb3a7f80fb7193da898a8521abd0658bb128e1 # Parent e6a43500629b8463a964b44ca5d38ddcb7d4dc63 Fix bin overrun in bpmToBin (proximate cause of bug #1054) diff -r e6a43500629b -r eafb3a7f80fb TempogramPlugin.cpp --- a/TempogramPlugin.cpp Thu Sep 25 18:42:35 2014 +0100 +++ b/TempogramPlugin.cpp Mon Sep 29 16:19:12 2014 +0100 @@ -577,7 +577,7 @@ int bin = floor((float)m_tempogramFftLength*w/sampleRate + 0.5); if(bin < 0) bin = 0; - else if(bin > m_tempogramFftLength/2.0f) bin = m_tempogramFftLength; + else if(bin > m_tempogramFftLength/2.0f) bin = m_tempogramFftLength/2.0f; return bin; }