libeech

BitTorrent library
git clone git://z3bra.org/libeech.git
Log | Files | Refs | README | LICENSE

commit b033a8902e08c34d57038b8358ea736e77138582
parent b30bde52988a54111ddb043a062bf5332d44e9b0
Author: z3bra <contactatz3bradotorg>
Date:   Thu Oct 19 14:44:17 +0200

tohex(): use unsigned values

Diffstat:
util.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util.c b/util.c @@ -9,8 +9,8 @@ tohex(char *in, char *out, size_t len) memset(out, 0, len*2 + 1); for (i=0, j=0; i<len; i++, j++) { - out[j] = hex[in[i] >> 4]; - out[++j] = hex[in[i] & 15]; + out[j] = hex[(unsigned char)in[i] >> 4]; + out[++j] = hex[(unsigned char)in[i] & 15]; } return out;