1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 20:45:46 +08:00

Fix off-by-one skip amount

This commit is contained in:
Endrik Tombak 2021-08-26 19:29:58 +03:00
parent a8d869c31c
commit 8bd7837bf7

View File

@ -111,7 +111,7 @@ namespace osu.Game.Screens.Select.Carousel
while (true)
{
if (forwardsIndex >= Children.Count)
return Children.Reverse().Skip(Children.Count - backwardsIndex).FirstOrDefault(item => !item.Filtered.Value);
return Children.Reverse().Skip(Children.Count - backwardsIndex - 1).FirstOrDefault(item => !item.Filtered.Value);
if (backwardsIndex < 0)
return Children.Skip(forwardsIndex).FirstOrDefault(item => !item.Filtered.Value);