Skip to content
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

Fix edge cases which allow very short slider placement in editor #32328

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

peppy
Copy link
Member

@peppy peppy commented Mar 11, 2025

Could lead to a game crash.


Closes #32295 (comment).

Addresses both dragging for more repeats on the slider in the provided .osu file, as well as getting into that state in the first place.

osu.2025-03-11.at.07.19.17.mp4

/// <summary>
/// Should be used to check whether placement can continue after a user editor operation.
/// </summary>
public bool HasValidLengthForPlacement => Precision.DefinitelyBigger(Distance, 0, 1);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed this to better show that it's only used in the editor. I wanted to make these changes without affecting parsing logic to keep things simple, and this property felt a bit iffy with its previous name and location.

@bdach bdach self-requested a review March 11, 2025 07:42
@bdach bdach merged commit 707a3cc into ppy:master Mar 11, 2025
7 of 10 checks passed
@peppy peppy deleted the fix-zero-sliders branch March 12, 2025 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to make reverse zero-length slider crashes the game
2 participants