fixed single-control-point linear sliders

This commit is contained in:
MaxOhn
2021-11-20 00:57:38 +01:00
parent ac1fd76daa
commit 7883bf85cc
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -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
+5
View File
@@ -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();