mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 08:30:06 +02:00
One of the compilation warning patches in f463eda36c059 made a bug...
... the variable bin may indeed be sometimes negative: see the test that follows.
This commit is contained in:
parent
df1d9a08fe
commit
ebc1092c4c
@ -984,8 +984,10 @@ bool SpecCache::CalculateOneSpectrum
|
||||
freqCorrection = multiplier * quotIm;
|
||||
}
|
||||
|
||||
const size_t bin = (size_t)(ii + freqCorrection + 0.5f);
|
||||
if (bin >= 0 && bin < hFFT->Points) {
|
||||
const int bin = (int)((int)ii + freqCorrection + 0.5f);
|
||||
// Must check if correction takes bin out of bounds, above or below!
|
||||
// bin is signed!
|
||||
if (bin >= 0 && bin < (int)hFFT->Points) {
|
||||
double timeCorrection;
|
||||
{
|
||||
const float
|
||||
|
Loading…
x
Reference in New Issue
Block a user