mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Fix index out of range possibility
This commit is contained in:
parent
0341023d13
commit
be4520fe33
@ -167,13 +167,13 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case PathType.PerfectCurve:
|
case PathType.PerfectCurve:
|
||||||
if (piece.PointsInSegment.Count > 3)
|
// Can't always create a circular arc out of 4 or more points,
|
||||||
{
|
// so we split the segment into one 3-point circular arc segment
|
||||||
// Can't always create a circular arc out of 4 or more points,
|
// and one bezier segment.
|
||||||
// so we split the segment into one 3-point circular arc segment
|
int thirdPointIndex = indexInSegment + 2;
|
||||||
// and one bezier segment.
|
|
||||||
piece.PointsInSegment[indexInSegment + 2].Type.Value = PathType.Bezier;
|
if (piece.PointsInSegment.Count > thirdPointIndex + 1)
|
||||||
}
|
piece.PointsInSegment[thirdPointIndex].Type.Value = PathType.Bezier;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user