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 bitsize in parseFloat function #1680

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

thevilledev
Copy link
Contributor

parseFloat function calls strconv.ParseFloat with an invalid bitsize parameter. This parameter should either be 32 (for 32-bit precision) or 64 (for 64-bit precision). The result is always of type float64.

Not a user-impacting change, since the internal implementation of strconv.ParseFloat defaults to bitsize of 64 if the given bitsize is anything else than 32.

@thevilledev thevilledev requested a review from a team December 4, 2022 17:01
Copy link
Contributor

@eikenb eikenb left a comment

Choose a reason for hiding this comment

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

Odd error.. and I think you're right that this should have no real impact on users as it would work the same but with the current implementation but is good to fix in case of future changes.

@eikenb eikenb merged commit 1448dcd into hashicorp:main Dec 5, 2022
@thevilledev thevilledev deleted the fix/parsefloat-bitsize branch December 7, 2022 17:40
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.

2 participants