1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Clamp backwards index to total current items to fix edge case of item removal

This commit is contained in:
Dean Herbert 2022-10-26 11:03:11 +09:00
parent cf3bf41b49
commit d9d083752a

View File

@ -118,7 +118,7 @@ namespace osu.Game.Screens.Select.Carousel
return null;
int forwardsIndex = lastSelectedIndex;
int backwardsIndex = lastSelectedIndex;
int backwardsIndex = Math.Min(lastSelectedIndex, Items.Count - 1);
while (true)
{