mirror of
https://github.com/ppy/osu.git
synced 2026-05-13 20:33:35 +08:00
f1ea3b354c
Resolves #37486 Original error log: ``` 2026-04-22 21:47:58 [error]: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') 2026-04-22 21:47:58 [error]: at System.Collections.Generic.List`1.get_Item(Int32 index) 2026-04-22 21:47:58 [error]: at osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay.Hand.PlayerHandOfCards.moveCardFocus(Int32 direction) 2026-04-22 21:47:58 [error]: at osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay.Hand.PlayerHandOfCards.OnKeyDown(KeyDownEvent e) ``` Currently, ```osu.Game\Screens\OnlinePlay\Matchmaking\RankedPlay\Hand\PlayerHandOfCards.cs::moveCardFocus``` does not account for the hand being empty (cards.Count ==0 ), and will attempt to move the card focus in the given direction regardless, which causes the above index out of range error. Added empty hand check to moveCardFocus, and a matching test case to TestScenePlayerCardHand.cs New test case before changes, recreating the error: <img width="986" height="232" alt="image" src="https://github.com/user-attachments/assets/daa62081-c776-44bd-b0d2-382b2dac7938" /> After: <img width="638" height="223" alt="image" src="https://github.com/user-attachments/assets/d6dcd8b8-8caf-42e3-9999-93dfe3fb6452" />
f1ea3b354c
·
2026-04-23 12:23:17 +09:00
History