From b01dc63165d3e1689c6c71c33b2f97ee98458b28 Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sun, 29 Jan 2023 14:50:00 +0100 Subject: [PATCH] Too early typecasting fixed. --- 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 ad5101c..68dfce5 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -490,7 +490,7 @@ namespace Recyclable.Collections public bool Contains(T item) => _memoryBlocks.Any(x => x.Contains(item)); - public void CopyTo(T[] array, int arrayIndex) => _memoryBlocks.CopyTo(0, _blockSize, (int)LongCount % _blockSize, array, arrayIndex); + public void CopyTo(T[] array, int arrayIndex) => _memoryBlocks.CopyTo(0, _blockSize, (int)(LongCount % _blockSize), array, arrayIndex); public IEnumerator GetEnumerator() => _memoryBlocks.Enumerate(_blockSize, LongCount).GetEnumerator();