From 55dc1459c7c963452f9878a2af493735e9a0ceee Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Tue, 31 Jan 2023 20:22:04 +0100 Subject: [PATCH] Incorrect indexes fixed. --- Recyclable.Collections/RecyclableList.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index 434615f..f1b650b 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -426,8 +426,8 @@ namespace Recyclable.Collections } } - _longCount = targetItemIdx; - _lastBlockIndex = targetBlockIdx - 1; + _longCount = targetBlockIdx * blockSize + targetItemIdx; + _lastBlockIndex = targetBlockIdx; _lastItemIndex = targetItemIdx; return; }