size_t characters = preidx + ( ( status->this > status->prec ) ? status->this : status->prec );
if ( status->width > characters )
{
- for ( int i = 0; i < status->width - characters; ++i )
+ for ( size_t i = 0; i < status->width - characters; ++i )
{
DELIVER( ' ' );
/*
}
}
/* Do the precision padding if necessary. */
- for ( int i = 0; i < prec_pads; ++i )
+ for ( size_t i = 0; i < prec_pads; ++i )
{
DELIVER( '0' );
}
if ( *spec == '*' )
{
/* Retrieve width value from argument stack */
+#if 1
+ int width = va_arg( status->arg, int );
+ if ( width < 0 )
+ {
+ status->flags |= E_minus;
+ status->width = width * -1; /* FIXME: Should be abs( width ) */
+ }
+ else
+ {
+ status->width = width;
+ }
+#else
+ /* FIXME: Old version - with unsigned status->width, condition <0 is never true */
if ( ( status->width = va_arg( status->arg, int ) ) < 0 )
{
/* Negative value is '-' flag plus absolute value */
status->flags |= E_minus;
status->width *= -1;
}
+#endif
++spec;
}
else