From a275c180a53dbe422b1609c01f21f26786a184cc Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sat, 8 Jul 2023 14:51:49 +0200 Subject: [PATCH] Tiny improvement. Added small protection against invalid state. --- Recyclable.Collections/RecyclableList.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index fbd0bd5..4baf582 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -187,7 +187,7 @@ namespace Recyclable.Collections [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Add(T item) { - if (_count == _capacity) + if (_count >= _capacity) { RecyclableListHelpers.ResizeAndCopy(this); }