scanf fails on "%hhx"
Bug #1598122 reported by
john
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Invalid
|
Undecided
|
Unassigned |
Bug Description
unsigned char i;
sscanf("9f", "%hhx", &i);
This code yields i = 9, which is wrong.
unsigned short i;
sscanf("9f", "%hx", &i);
This code yields i = 0x9f, which is correct.
To post a comment you must log in.
Hi John,
I agree with the fact the behavior you are observing is wrong. However, I am not able to reproduce it with the latest release. What version are you using?
Cheers,
Andre