From mboxrd@z Thu Jan 1 00:00:00 1970 From: E Robertson Date: Mon, 26 Jan 2009 14:53:05 -0600 Subject: [U-Boot] sprintf side effect, a bug? Message-ID: <200901261453.10434.e.robertson.svg@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, It seems that sprintf() is modifying at least two bytes from the source and I have duplicate this with different varibles. For instance, I have a mac address defined as unsigned char [6]: Doing the following sets the environment variable correctly, however bytes [0] and [1], are modified at the source. sprintf(env_ethaddr,"%02X:%02X:%02X:%02X:%02X:%02X", MACAddress[0], MACAddress[1], MACAddress[2], MACAddress[3], MACAddress[4], MACAddress[5]); Has anyone noticed this before? I don't think the machine matters but I am building for an arm at91. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20090126/68e825fd/attachment.pgp