This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/216] scanf() conversion %i incorrectly reads unsigned hex values
- From: "relf at os2 dot ru" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 11 Jun 2004 08:41:19 -0000
- Subject: [Bug libc/216] scanf() conversion %i incorrectly reads unsigned hex values
- References: <20040611074730.216.relf@os2.ru>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From relf at os2 dot ru 2004-06-11 08:41 -------
I'm a little bit confused. Assignments like
int x = 0xF1234567;
are perfectly valid in C. In this particular assignment x gets value -249346713.
What is the difference with sscanf(s,"%i",&x); construction? Why 32-bit
hexadecimal value is not converted to int type?
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=216
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.