[Icc-avr] printf off by 1?
Richard Man
richard-lists at imagecraft.com
Wed Jul 2 13:34:20 PDT 2008
Bob, not sure what you mean by one byte off, or off by one, but ALL
variable argument functions such as printf, relies on the Standard
C's rule of argument promotion, e.g. any "char" arguments to printf
are promoted to int.
Hope this helps.
At 08:44 AM 7/2/2008, bobgardner at aol.com wrote:
>Anyone see anything that would make this print out one byte off? The
>var sizes are mixed... 1 byte, 2 byte.... but the cprintf that prints em out
>thinks they are all 2 byte? How does a %d know if it has a byte or
>an int for a param?? Sorry about losing the indent.... hope its not
>too wierd to read....
// richard (This email is for mailing lists. To reach me directly,
please use richard at imagecraft.com)
More information about the Icc-avr
mailing list