llu fails for hex in fscanf

Bug #1074164 reported by Will Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

given text input from file as:

10000,
020,0xf123456abaff123a, ...

while(!feof(pat)){
fscanf(pat," %llu%*[ ,\n]",&conv); // should convert decimal, octal, or hex notation, but this is not the case...chokes on 'x'

using %llx does convert hex, but converts everything else as hex too (which is not the desired behavior).

(some of the *[ ... notation to discard commas and white space may not be optimized)

has this behavior been addressed, or is this an incorrect understanding of the %u specifier?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.