mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Fix out of bounds exception during indexing
This commit is contained in:
@ -122,8 +122,14 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
return list[pivot];
|
||||
}
|
||||
|
||||
// l will be the first control point with Time > time, but we want the one before it
|
||||
return list[l - 1];
|
||||
if (l > 0)
|
||||
{
|
||||
// l will be the first control point with Time > time, but we want the one before it
|
||||
return list[l - 1];
|
||||
}
|
||||
|
||||
// If the binary search failed, l will be unaffected
|
||||
return list[l];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user