Commit 254e7234 authored by deuce's avatar deuce
Browse files

Switch to using safe_snprintf() where the return value is used.

With the supported compilers, we can't rely on the return value of snprintf()
and historically have replaced it with safe_snprintf().  For macOS however,
snprintf() is apparently a macro, not a function, so gendefs.h throws and
error due to redefinition.

Rather than hack around on that, just ensure that we never use the return
value of snprintf() and use safe_snprintf() to ensure we know what the
return value will be.
parent 732221fd
......@@ -215,7 +215,7 @@ char* DLLCALL c_escape_str(const char* src, char* dst, size_t maxlen, BOOL ctrl_
} else if((uchar)*s < ' ') {
d += snprintf(d, maxlen-(d-dst), "\\x%02X", *s);
d += safe_snprintf(d, maxlen-(d-dst), "\\x%02X", *s);
} else *d++=*s;
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