Allow format strings containing "%%" to be reused.

PR:		39116
Submitted by:	Egil Brendsdal <egilb@ife.no>
MFC after:	1 week
This commit is contained in:
Tim J. Robbins 2002-06-19 08:18:37 +00:00
parent 37fd459046
commit 5f19035b04

View File

@ -173,8 +173,8 @@ next: for (start = fmt;; ++fmt) {
if (*fmt == '%') {
if (*++fmt != '%')
break;
*fmt++ = '\0';
(void)printf("%s", start);
(void)printf("%.*s", (int)(fmt - start), start);
fmt++;
goto next;
}
}