diff options
Diffstat (limited to 'sms')
-rw-r--r-- | sms/harmDetection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sms/harmDetection.c b/sms/harmDetection.c index a2be13b..bf99729 100644 --- a/sms/harmDetection.c +++ b/sms/harmDetection.c @@ -339,7 +339,7 @@ sfloat sms_harmDetection(int numPeaks, SMS_Peak* spectralPeaks, sfloat refFundam lowestFreq = lowestFreq * refHarmonic; highestFreq = highestFreq * refHarmonic; - while((peakFreq < highestFreq) && (iPeak < numPeaks)) + while((peakFreq < highestFreq) && (iPeak < numPeaks - 1)) { iPeak++; peakFreq = spectralPeaks[iPeak].fFreq; |