mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Clamp backwards index to total current items to fix edge case of item removal
This commit is contained in:
parent
cf3bf41b49
commit
d9d083752a
@ -118,7 +118,7 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
int forwardsIndex = lastSelectedIndex;
|
int forwardsIndex = lastSelectedIndex;
|
||||||
int backwardsIndex = lastSelectedIndex;
|
int backwardsIndex = Math.Min(lastSelectedIndex, Items.Count - 1);
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user