Skip to content

Fix incorrect validation of circle size / key count #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 21, 2025

Conversation

bdach
Copy link
Contributor

@bdach bdach commented Apr 21, 2025

The big issue is that the range specified on the attribute was [1, 18] which only makes sense in mania.

The small issue that while the range was checked, nothing decimal should really be allowed for mania anyway.

A significant amount of this is kind of much-of-muchness because LegacyBeatmapDecoder already does clamping on this, so the checks are kind of dead in practice, but I'd rather have them not, what with users' propensity to try and break stuff and not have us notice that it happened.

The game package bump here is significant because it exposes LegacyBeatmapDecoder.MAX_MANIA_KEY_COUNT.

bdach added 2 commits April 21, 2025 10:53
The big issue is that the range specified on the attribute was [1, 18]
which only makes sense in mania.

The small issue that while the range was checked, nothing decimal should
really be allowed for mania anyway.

A significant amount of this is kind of much-of-muchness because
`LegacyBeatmapDecoder` already does clamping on this:

https://github.com/ppy/osu/blob/834d63d1deacf0be0c4e76cd5d47cee136fbb49a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs#L113-L131

so the checks are kind of dead in practice, but I'd rather have them
not, what with users' propensity to try and break stuff and not have us
notice that it happened.

The game package bump here is significant because it exposes
`LegacyBeatmapDecoder.MAX_MANIA_KEY_COUNT`.
@bdach bdach self-assigned this Apr 21, 2025
@smoogipoo smoogipoo requested a review from peppy April 21, 2025 10:10
@peppy peppy merged commit fd759f7 into ppy:master Apr 21, 2025
4 checks passed
@bdach bdach deleted the wrong-cs-limits branch April 28, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants