Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
printf: fix formatting for zero value when precision is zero#8351
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
For clippy related issues, it may be helpful to run locally:
|
Ah, forgot to check lint. Thank you. |
ifletSome(prec) = precision{ | ||
if precasu64 > i32::MAXasu64{ | ||
returnErr(FormatError::InvalidPrecision(prec.to_string())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
based onpipeline, didn't like naming ofprec
, try renaming
if precisionasu64 > i32::MAXasu64{ | ||
returnErr(FormatError::InvalidPrecision(precision.to_string())); | ||
ifletSome(prec) = precision{ | ||
if precasu64 > i32::MAXasu64{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
based onpipeline, didn't like naming of prec, try renaming
GNU testsuite comparison:
|
nickorlow commentedJul 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Will look into failing tests + other lints I didn't pick up earlier |
Fixes issue#7509
According to the C/C++ reference, "if both the value and precision are 0, the conversion results in no characters. "
This PR also includes code to handle the following exceptions:
0
should be outputted