- Fixed Bug #35978 %n format string specifier wrongly implemented

This commit is contained in:
Marcus Boerger 2006-01-24 20:57:56 +00:00
parent 0e42375ded
commit a372669d4a
2 changed files with 4 additions and 2 deletions

View file

@ -1015,7 +1015,7 @@ static int format_converter(register buffy * odp, const char *fmt,
case 'n':
*(va_arg(ap, int *)) = cc;
break;
goto skip_output;
/*
* Always extract the argument as a "char *" pointer. We
@ -1096,6 +1096,7 @@ fmt_error:
if (adjust_width && adjust == LEFT && min_width > s_len)
PAD(min_width, s_len, pad_char);
}
skip_output:
fmt++;
}
odp->nextb = sp;

View file

@ -722,7 +722,7 @@ fmt_string:
case 'n':
*(va_arg(ap, int *)) = xbuf->len;
break;
goto skip_output;
/*
* Always extract the argument as a "char *" pointer. We
@ -802,6 +802,7 @@ fmt_error:
PAD(unicode, xbuf, min_width - s_len, pad_char);
}
}
skip_output:
fmt++;
}
return;