X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=quote.c;h=d88bf7515932bba96c694478c3b51c85549fa92a;hb=55ced83d8aca98277c6a495932c57e6c3c45930b;hp=aa440098e1d8a771aa2d9d2e17355fd560f3c253;hpb=96c48153c9a2905fb2f1d588c11e36272635cb79;p=git.git diff --git a/quote.c b/quote.c index aa440098e..d88bf7515 100644 --- a/quote.c +++ b/quote.c @@ -188,7 +188,8 @@ static int quote_c_style_counted(const char *name, int namelen, #define EMITQ() EMIT('\\') const char *sp; - int ch, count = 0, needquote = 0; + unsigned char ch; + int count = 0, needquote = 0; if (!no_dq) EMIT('"'); @@ -197,7 +198,7 @@ static int quote_c_style_counted(const char *name, int namelen, if (!ch) break; if ((ch < ' ') || (ch == '"') || (ch == '\\') || - (ch >= 0177)) { + (quote_path_fully && (ch >= 0177))) { needquote = 1; switch (ch) { case '\a': EMITQ(); ch = 'a'; break;