printf: fix 1.12.0 breakage (from %*d fix). It was misinterpreting "*"

This commit is contained in:
Denis Vlasenko 2009-03-03 14:14:44 +00:00
parent 248ce91017
commit 6852effbc2
1 changed files with 3 additions and 3 deletions

View File

@ -139,14 +139,14 @@ static void print_direc(char *format, unsigned fmt_length,
char saved;
char *have_prec, *have_width;
saved = format[fmt_length];
format[fmt_length] = '\0';
have_prec = strstr(format, ".*");
have_width = strchr(format, '*');
if (have_width - 1 == have_prec)
have_width = NULL;
saved = format[fmt_length];
format[fmt_length] = '\0';
switch (format[fmt_length - 1]) {
case 'c':
printf(format, *argument);