This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GLibc sscanf bug


wasik <wasik@broumovska.lbcfree.net> writes:

> I think the second line should be -1 as the line does not match defined
> format of sscanf.

Not a bug.  %d matches +2, so 2 it is assigned to pl.  Then matching %%
against the next character fails and scanf returns.  There is no way to
find out the exact position where matching stopped between conversion
specifications.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]