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

Ensure pyfloat honors min and max values #1826

Merged
merged 3 commits into from Apr 4, 2023
Merged

Conversation

mvanderlee
Copy link
Contributor

What does this change

Ensure we don't override the user input.
Validate that we're within the allowed range, and if not, ensure we are with some randomness.

What was wrong

As shown in #1825, pyfloat would reliably produce results that exceeded the provided values.

How this fixes it

Copy the arguments and modify the copy instead of the original arguments.
Check that we're in the required range, and if not, ensure we are.

Fixes #1825.

Copy link
Collaborator

@fcurella fcurella left a comment

Choose a reason for hiding this comment

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

Thank you!

@fcurella fcurella merged commit 842c983 into joke2k:master Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pyfloat produces values outside of the allowed range.
2 participants