mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Fix possible IndexOutOfRangeException
This commit is contained in:
parent
e7e0c49f42
commit
58bffa13cd
@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
|
|
||||||
var result = arr.ToList();
|
var result = arr.ToList();
|
||||||
|
|
||||||
while (Precision.AlmostEquals(result[^1], result[^2]))
|
while (Precision.AlmostEquals(result[^1], result[^2]) && result.Count > 1)
|
||||||
result.RemoveAt(result.Count - 1);
|
result.RemoveAt(result.Count - 1);
|
||||||
|
|
||||||
return result.ToArray();
|
return result.ToArray();
|
||||||
|
Loading…
Reference in New Issue
Block a user