Skip to content
Snippets Groups Projects
Commit a302a01b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Escape chars >= 0x7f too (DEL and ex-ASCII/UTF-8 and whatnot)

parent a16f8a00
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3168 passed
......@@ -245,7 +245,7 @@ char* c_escape_str(const char* src, char* dst, size_t maxlen, BOOL ctrl_only)
if((!ctrl_only || (uchar)*s < ' ') && (e=c_escape_char(*s))!=NULL) {
strncpy(d,e,maxlen-(d-dst));
d+=strlen(d);
} else if((uchar)*s < ' ') {
} else if((uchar)*s < ' ' || (uchar)*s >= '\x7f') {
d += safe_snprintf(d, maxlen-(d-dst), "\\x%02X", *s);
} else *d++=*s;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment