Tiny improvement. Added small protection against invalid state.

This commit is contained in:
mlemanczyk committed 2023-07-08 14:51:49 +02:00
1 parent b39b4d2f4a
commit a275c180a5
1 file changed
+1 -1
+1 -1
View File
@@ -187,7 +187,7 @@ namespace Recyclable.Collections
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Add(T item)
{
if (_count == _capacity)
if (_count >= _capacity)
{
RecyclableListHelpers<T>.ResizeAndCopy(this);
}