This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: GLibc sscanf bug
- From: Andreas Schwab <schwab at suse dot de>
- To: wasik <wasik at broumovska dot lbcfree dot net>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Sat, 19 Jun 2004 18:33:44 +0200
- Subject: Re: GLibc sscanf bug
- References: <20040619155117.GA500@broumovska.lbcfree.net>
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."