Joren l'Ami. Also fixes %p when arg is 0 (printed 0 instead of 0x0).
unsigned_val = signed_val;
}
if ((flags & FL_ALT) && (c == 'o')) *s++ = '0';
- if (!unsigned_val) {
+ if (!unsigned_val && c != 'p') {
if (!precision)
return s;
} else if (((flags & FL_ALT) && (c == 'x' || c == 'X'))
*/
between_fill = 0;
if ((flags & FL_ZEROFILL)
- && (((c == 'x' || c == 'X') && (flags & FL_ALT))
+ && (((c == 'x' || c == 'X') && (flags & FL_ALT) && j > 1)
|| (c == 'p')
|| ((flags & FL_SIGNEDCONV)
&& ( *s1 == '+' || *s1 == '-' || *s1 == ' '))))