(xdprval): Fix for strings containing backslashes.
This commit is contained in:
parent
5346422665
commit
4798d1466b
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ xdprval(struct valstr *val, char *sep)
|
|||
if (s) {
|
||||
pr("%s\"", sep);
|
||||
while (*s) {
|
||||
for (e = s; *e != '"' && isprint(*e); ++e) ;
|
||||
for (e = s; *e != '"' && *e != '\\' && isprint(*e); ++e) ;
|
||||
pr("%.*s", (int)(e-s), s);
|
||||
if (*e)
|
||||
pr("\\%03o", *e++);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue