Escape '\\' in journal, but not '\t'
This commit is contained in:
parent
a7be765ed4
commit
27212dc46b
1 changed files with 3 additions and 1 deletions
|
@ -92,7 +92,9 @@ journal_entry(char *fmt, ...)
|
|||
va_end(ap);
|
||||
|
||||
for (p = (unsigned char *)buf; *p; p++) {
|
||||
if (isprint(*p))
|
||||
if (*p == '\\')
|
||||
fprintf(journal, "\\\\");
|
||||
else if (isprint(*p) || *p == '\t')
|
||||
putc(*p, journal);
|
||||
else
|
||||
fprintf(journal, "\\%03o", *p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue