diff --git a/src/tool_setopt.c b/src/tool_setopt.c index 7eb64b0397..2ed68e5eb3 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -227,7 +227,7 @@ static char *c_escape(const char *str) e += 2; } else if(! isprint(c)) { - snprintf(e, 4, "\\%03o", c); + snprintf(e, 5, "\\%03o", (unsigned)c); e += 4; } else