pull/60/merge
Doug Goldstein 2025-04-05 17:37:45 +11:00 committed by GitHub
commit 61a018a96a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -218,7 +218,9 @@ size_t vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) {
/* Process field width */
width = 0;
for ( ; ; fmt++ ) {
if ( ( ( unsigned ) ( *fmt - '0' ) ) < 10 ) {
if ( *fmt == '*' ) {
width = va_arg(args, int);
} else if ( ( ( unsigned ) ( *fmt - '0' ) ) < 10 ) {
width = ( width * 10 ) + ( *fmt - '0' );
} else {
break;