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

Only allow finite numbers in Range.value. #81076

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

Jordyfel
Copy link
Contributor

@Jordyfel Jordyfel commented Aug 28, 2023

Fixes #81057.

Since this property represents a number in a range, it doesn't make sense for it to be inf or nan.

Bugsquad edit: Fixes #80755

@Jordyfel Jordyfel requested a review from a team as a code owner August 28, 2023 13:45
@AThousandShips AThousandShips added this to the 4.2 milestone Aug 28, 2023
scene/gui/range.cpp Outdated Show resolved Hide resolved
scene/gui/spin_box.cpp Outdated Show resolved Hide resolved
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

LGTM

@AThousandShips
Copy link
Member

AThousandShips commented Aug 28, 2023

Does this solve #80755 for manually edited values in the files? Otherwise I think a dedicated fix is required, including if broken past versions exist

@KoBeWi
Copy link
Member

KoBeWi commented Aug 28, 2023

By manually editing you can make the scene completely unopenable in the editor, so I don't think it's a concern. We should only make sure that the data saved by the editor itself is valid.
Also #80755 is difficult to break something by accident. I only opened the issue because I was testing a PR that made it easier to trigger. We also didn't get other reports of broken scenes by using inputting invalid numbers.

@MewPurPur
Copy link
Contributor

To be clear about what I said there, I've only broken my scenes before because I was goofing around and seeing how much I can break Godoh - not intentionally.

@akien-mga akien-mga merged commit 541674d into godotengine:master Aug 28, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

SpinBox accepts NAN as input. Editor view can be moved to infinity, making the scene permanently uneditable
5 participants