fix safe print for newlines

This commit is contained in:
hummypkg 2011-06-04 23:43:50 +00:00 committed by HummyPkg
parent 56b68007d8
commit 3c4211574f
1 changed files with 1 additions and 1 deletions

2
util.c
View File

@ -55,7 +55,7 @@ safeprintf(char *fmt, ...)
va_end(argp);
for (p = buf; p < buf + len; p++)
if (!isprint(*p) && *p != '\t')
if (!isprint(*p) && *p != '\t' && *p != '\n')
*p = '.';
printf("%.*s", len, buf);