strbuf: fix urlencode format string on signed char
authorJulien Dusser <julien.dusser@free.fr>
Fri, 22 Dec 2017 17:24:37 +0000 (18:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Dec 2017 21:43:19 +0000 (13:43 -0800)
commit4c267f2ae37e5b5f834172f04b7dd4343e370689
treeac5948b7a6ac5e2780b174083a2f01ad4331a8bd
parent3013dff8662eae06457fe6e5348dfe2270810ab2
strbuf: fix urlencode format string on signed char

Git credential fails with special char in password with

    remote: Invalid username or password.
    fatal: Authentication failed for

    File ~/.git-credential contains badly urlencoded characters
    %ffffffXX%ffffffYY instead of %XX%YY.

Add a cast to an unsigned char to fix urlencode use of %02x on a
char.

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
strbuf.c