FFTW.NET
FFTW.NET copied to clipboard
ArgumentOutOfRangeException in BufferPool.cs
There is a logic bug where i-- makes i go to -1. A proposed fix here:
--- a/FFTW.NET/BufferPool.cs
+++ b/FFTW.NET/BufferPool.cs
@@ -83,7 +83,7 @@ namespace FFTW.NET
if (item.Size >= minSize)
{
bufferPool._buffers.RemoveAt(i--);
- if (bufferPool._buffers[i].Buffer.TryGetTarget(out buffer))
+ if (item.Buffer.TryGetTarget(out buffer))
break;
}
}
@liaody @ArgusMagnus This appears to be fixed by https://github.com/ArgusMagnus/FFTW.NET/pull/10.