MaxOhn / rosu-pp

PP and star calculation for all osu! gamemodes
MIT License
79 stars 40 forks source link

Crash when processing 0-hitobject beatmap #5

Closed kiwec closed 2 years ago

kiwec commented 2 years ago
thread 'main' panicked at 'attempt to subtract with overflow', /home/kiwec/.cargo/registry/src/github.com-1ecc6299db9ec823/rosu-pp-0.4.0/src/osu/mod.rs:287:28

The beatmap: https://osu.ppy.sh/beatmapsets/195741
Title might be wrong since the website says it has 2 sliders, but idk.
Alternative: https://osu.ppy.sh/beatmapsets/194899#osu/470113

https://github.com/MaxOhn/rosu-pp/blob/main/src/osu/mod.rs#L287

MaxOhn commented 2 years ago

Ugh I accidentally re-introduced that issue with my most recent refactoring, thanks for letting me know. Fixed with #6 but I'll likely wait a little until I put it onto main and release it since it's only an edge case and not a pressing issue. Will close this issue once I fully merge it.

MaxOhn commented 2 years ago

New release is out, fix is merged 👌