Fixing rare out-of-bounds crash

This commit is contained in:
Cai Biesinger 2020-12-31 20:35:13 -08:00
parent 947649ab89
commit 6e5e659047

View file

@ -24,7 +24,7 @@ int DecomposeHistogram( float * histogram, int bins, struct NoteDists * out_dist
float this = histogram[i]; float this = histogram[i];
float next = histogram[(i+1)%bins]; float next = histogram[(i+1)%bins];
if( prev > this || next > this ) continue; if( prev >= this || next > this ) continue;
if( prev == this && next == this ) continue; if( prev == this && next == this ) continue;
//i is at a peak... //i is at a peak...