X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/008676633c2ad2c325837c2b64915f7ded690a8f..a991bd8d3e7fe02dbca0644054bab73c5b75324a:/bsd/libkern/url_encode.c diff --git a/bsd/libkern/url_encode.c b/bsd/libkern/url_encode.c index 28534ada1..0ca3d5eb0 100644 --- a/bsd/libkern/url_encode.c +++ b/bsd/libkern/url_encode.c @@ -66,18 +66,15 @@ url_decode(char *str) c += hex2int(*str++); } if (*str) { - c = (c << 4) + hex2int(*str++); + c = (char)((c << 4) + hex2int(*str++)); } if (isprint(c)) { /* overwrite the '%' with the new char, and bump the rest of the * string down a few characters */ *esc++ = c; - str = memmove(esc, str, strlen(str)+1); - } else { - str++; + str = memmove(esc, str, strlen(str) + 1); } - } else { str++; }