1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 00:45:43 +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) while (true)
{ {
if (forwardsIndex >= Children.Count) 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) if (backwardsIndex < 0)
return Children.Skip(forwardsIndex).FirstOrDefault(item => !item.Filtered.Value); return Children.Skip(forwardsIndex).FirstOrDefault(item => !item.Filtered.Value);