#else
length = strlen(PTR);
#endif
+ if ( decimals == -1 )
+ {
+ decimals = length;
+ }
if ( ( !left_justify ) && (length < width) )
{
width -= length;
}
}
- while ( *PTR )
+ while ( *PTR && (decimals-- > 0))
{
output_char( *PTR++, p );
charsOutputted++;