FFTW.NET icon indicating copy to clipboard operation
FFTW.NET copied to clipboard

ArgumentOutOfRangeException in BufferPool.cs

Open liaody opened this issue 7 years ago • 1 comments

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 avatar Nov 03 '18 01:11 liaody

@liaody @ArgusMagnus This appears to be fixed by https://github.com/ArgusMagnus/FFTW.NET/pull/10.

DumpsterDoofus avatar Jul 11 '20 19:07 DumpsterDoofus