Fix possible IndexOutOfRangeException

This commit is contained in:
Pasi4K5 2023-08-16 01:19:41 +02:00
parent e7e0c49f42
commit 58bffa13cd

View File

@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Objects
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);
return result.ToArray();