1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 17:27:39 +08:00

Disallow inserting a group if one already exists with the current time value

This commit is contained in:
Dean Herbert 2019-10-27 16:31:23 +09:00
parent 81b5d7b79f
commit 0179586f78

View File

@ -301,9 +301,11 @@ namespace osu.Game.Beatmaps.ControlPoints
var newGroup = new ControlPointGroup(time);
int i = groups.BinarySearch(newGroup);
if (i < 0) i = ~i;
groups.Insert(i, newGroup);
if (i > 0)
return groups[i];
groups.Insert(~i, newGroup);
return newGroup;
}