diff --git a/strbuf.c b/strbuf.c index 8007be8fba..1df674e919 100644 --- a/strbuf.c +++ b/strbuf.c @@ -683,7 +683,7 @@ static void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len, (!reserved && is_rfc3986_reserved(ch))) strbuf_addch(sb, ch); else - strbuf_addf(sb, "%%%02x", ch); + strbuf_addf(sb, "%%%02x", (unsigned char)ch); } }