-
Notifications
You must be signed in to change notification settings - Fork 54
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
Zero padding disabled when precision specified, spaces padded instead #73
Comments
First, thank you for the kind words. Second - I'll assume you meant Now... if we build this:
against glibc 2.31-13, we get:
with no To my knowledge, when you explicitly specify the precision (which in your case I believe you are - no-number is interpreted as 0 precision) - 0-instead-of-space padding is ignored. This is also how things are described on this page. If you believe that's a mistake, please refer me to the relevant places in the official standard. |
Thank you for your prompt reply. That seems like a logical reason. Apologies for the misfiled report. I see there may be an alternative way to get my desired output. |
No problem whatsoever. But it always helps to check what glibc's
What's wrong with |
You're absolutely correct. I was totally ignorant that this library so closely tracked an official reference standard. I'm really sorry for the bother. Thank you again for maintaining a current fork. |
Well, the best ways to thank me are:
|
An issue I've noticed:
uint c=29;
printf("%03.u", c);
Output: " 29"
Expected: "029"
In v5.2.0 around line 961:
A hack:
Maybe there is a logical reason for this, or maybe the precision handling code isn't aware of the padding type it should be doing?
Thank you for maintaining this. I just found the updated fork. I've been using v4 for years.
The text was updated successfully, but these errors were encountered: