MaxOhn / rosu-pp

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

Fails on a ranked map (the map appears corrupted but the checksum matches) #8

Closed goeo- closed 2 years ago

goeo- commented 2 years ago

This map https://osu.ppy.sh/beatmapsets/13023#osu/49374 (https://osu.ppy.sh/osu/49374) has byte 0xd1 as a storyboard command.

As the map is ranked, I think rosu-pp should support it somehow.

The error this causes is of course :

Error: failed parse

Caused by:
    0: IO error
    1: stream did not contain valid UTF-8

Not sure what would be a good solution other than not reading the file as a string, but as a byte vector. Epic project btw, saved me from running C# on my server, thank you!

MaxOhn commented 2 years ago

Mh I do see the problem, you're right though that it should definitely work on ranked maps at the very least. Using a vector instead of a string is the right way to go, I'll get to working on it. It might even speed up parsing altogether a little bit since utf-8 validation will be avoided at some points so that's a nice upside.

MaxOhn commented 2 years ago

Fix is done, I'll finish up and then merge and publish.