mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Escape unprintable chars.
This commit is contained in:
parent
1f9735d0cb
commit
f680521e0f
1 changed files with 4 additions and 1 deletions
|
@ -388,7 +388,10 @@ quote_string (const char *str)
|
|||
dstring_appendstr (q, """);
|
||||
break;
|
||||
default:
|
||||
dstring_appendstr (q, c);
|
||||
if (c[0] >= 127 || c[0] < 32)
|
||||
dasprintf (q, "\\\\x%02d", (byte) c[0]);
|
||||
else
|
||||
dstring_appendstr (q, c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue