libc: fix incorrect cast of field width to char

This commit is contained in:
K. Lange 2023-07-04 16:46:21 +09:00
parent ddf7a79707
commit 47bfbec647
2 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ size_t xvasprintf(int (*callback)(void *, char), void * userData, const char * f
alt = 1;
++f;
} else if (*f == '*') {
arg_width = (char)va_arg(args, int);
arg_width = (int)va_arg(args, int);
++f;
} else if (*f == '0') {
fill_zero = 1;

View File

@ -143,7 +143,7 @@ size_t xvasprintf(int (*callback)(void *, char), void * userData, const char * f
alt = 1;
++f;
} else if (*f == '*') {
arg_width = (char)va_arg(args, int);
arg_width = (int)va_arg(args, int);
++f;
} else if (*f == '0') {
fill_zero = 1;