We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
int a = 0x5a5a5a5a; printf("%x", a);
0x5a5a5a5a ?
how could i remove the prefix when using x X p format?
thx
The text was updated successfully, but these errors were encountered:
That's not the output you get. printf("%x",a) yields 5a5a5a5a, while printf("%#x",a) yields 0x5a5a5a5a.
printf("%x",a)
5a5a5a5a
printf("%#x",a)
0x5a5a5a5a
Sorry, something went wrong.
i found the code https://github.com/eyalroz/printf/blob/3f6d9725ab50906c107028b5c75b016adad2ce81/src/printf/printf.c#L360-#L368 and
printf/src/printf/printf.c
Line 1037 in 3f6d972
comment L360-L368, modify L1037 width = sizeof(void*) * 2U;, now solved it.
width = sizeof(void*) * 2U;
@thewon86 If you still believe printf("%x",a) yields 0x5a5a5a5a , I would suggest making an obvious change like:
printf("---> %x <---",a);
And I think you'll find that this isn't the line being executed. You most likely have a "%#x" somewhere else in your source.
No branches or pull requests
int a = 0x5a5a5a5a;
printf("%x", a);
how could i remove the prefix when using x X p format?
thx
The text was updated successfully, but these errors were encountered: