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:
parent
a8d869c31c
commit
8bd7837bf7
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user