Commit 6ba2c83c authored by rswindell's avatar rswindell
Browse files

Insure c_escape_str escapes (hex-encodes) all control chars, not just those

that have standard C mnemonics.
parent e5415160
......@@ -213,6 +213,8 @@ char* DLLCALL c_escape_str(const char* src, char* dst, size_t maxlen, BOOL ctrl_
if((!ctrl_only || (uchar)*s < ' ') && (e=c_escape_char(*s))!=NULL) {
strncpy(d,e,maxlen-(d-dst));
d+=strlen(d);
} else if((uchar)*s < ' ') {
d += snprintf(d, maxlen-(d-dst), "\\x%02X", *s);
} else *d++=*s;
}
*d=0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment