Properly print characters larger than 127.
Submitted by: noordsij <noordsij@cs.helsinki.fi> Reviewed by: Eric Schrock <eric.schrock@delphix.com> MFC after: 1 month
This commit is contained in:
parent
97b0bfc2e9
commit
939f98dd4d
@ -138,8 +138,10 @@ stream_bytes(FILE *fp, const char *string)
|
||||
while (*string) {
|
||||
if (*string > ' ' && *string != '\\' && *string < '\177')
|
||||
(void) fprintf(fp, "%c", *string++);
|
||||
else
|
||||
(void) fprintf(fp, "\\%03o", *string++);
|
||||
else {
|
||||
(void) fprintf(fp, "\\%03hho",
|
||||
(unsigned char)*string++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user