Skip first indexes if requested

Fixes partition2 calls
This commit is contained in:
Kurt 2021-05-11 23:25:36 -07:00
parent 013aac602f
commit b97b54e5e4

View file

@ -171,8 +171,9 @@ namespace PKHeX.Core
// store values that match criteria at the next available position of the array
// store non-matches starting at the end. reverse before returning
int end = list.Count - 1;
foreach (var item in list)
for (var index = start; index < list.Count; index++)
{
var item = list[index];
if (criteria(item.Value))
result[start++] = item;
else