This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32311] fprintf prints only a part of a string if the string has \x00
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jun 2007 17:40:12 -0000
- Subject: [Bug c/32311] fprintf prints only a part of a string if the string has \x00
- References: <bug-32311-14609@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-06-12 17:40 -------
This is correct behavior because strings are really char arrays terminated by
the null character (0 aka '\x00') so when you write "k\x00%f", you really have
a string that is only of length 1.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32311