Update of bug #32322 (project avr-libc): Status: None => Invalid Assigned to: None => joerg_wunsch Open/Closed: Open => Closed
_______________________________________________________ Follow-up Comment #1: No bug involved (apart from the obvious bug that you supply the arguments for sprintf() yet try to call snprintf()), The field width includes everything that is eventually generated by the format specifier, so the "0x" is always included in the field width, and already occupies the entire output field except in the 0 case. Any actual data to be formatted thus has to overflow the output field. The 0 case is different, as ISO/IEC 9899:1999 requires the implementation to *not* generate the 0x prefix in that case: # The result is converted to an ``alternative form''. [...] For x (or X) conversion, a nonzero result has 0x (or 0X) prefixed to it. [...] Thus, the output field is sufficient, and as the '0' flag has been given, it is zero-padded to the left, resulting in "00". _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?32322> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev