fixed single-control-point linear sliders
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- Added a bunch of documentation.
|
||||
- [BREAKING] Removed the `ParseError` variants `InvalidPathType` and `InvalidTimingSignature` and renamed `InvalidFloatingPoint` to `InvalidDecimalNumber`.
|
||||
- [BREAKING] Removed the `last_control_point` field of `HitObjectKind::Slider` when neither the `osu` nor the `fruits` feature is enabled.
|
||||
- Fixed out of bounds panic on maps with single-control-point linear sliders
|
||||
|
||||
# v0.3.0
|
||||
|
||||
|
||||
@@ -183,6 +183,11 @@ impl Curve {
|
||||
return cumulative_len;
|
||||
}
|
||||
|
||||
// Shortcut when it's just (0,0) since there's nothing to do anyway
|
||||
if cumulative_len.len() == 1 {
|
||||
return cumulative_len;
|
||||
}
|
||||
|
||||
// * The last length is always incorrect
|
||||
cumulative_len.pop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user