else
break;
}
- while( c = *format++ );
+ while( (c = *format++) );
// Padding length
if( c == '*' ) {
// String
case 's':
p = va_arg(args, char*);
- sprintf_puts:
if(!p) p = "(null)";
//_SysDebug("vsnprintf: p = '%s'", p);
if(precision >= 0)
tmpBuf[pos++] = map[ num % base ]; // Last digit of {number}
// length of number, minus the sign character
- PadLength -= pos - sign_is_neg - (SignChar != '\0');
+ PadLength -= pos + (sign_is_neg || SignChar != '\0');
+ Precision -= pos + (sign_is_neg || SignChar != '\0');
if( !bPadRight )
{
while(PadLength-- > 0)
_putch('+');
else {
}
+
+ num += precision_max/10 * 5;
int value;
// Whole section
_putch('p');
else
_putch('e');
- ret += _printf_itoa(putch_cb, putch_h, sci_exponent, Base, FALSE, TRUE, '+', 0, 0, '\0', FALSE);
+ ret += _printf_itoa(putch_cb, putch_h, sci_exponent, Base, FALSE, TRUE, '+', 3, 0, '\0', FALSE);
}
#undef _putch