1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 03:42:55 +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 59d983b66e
commit 2a6b3fd67c

View File

@ -279,9 +279,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;
}