]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/libkern/url_encode.c
xnu-7195.81.3.tar.gz
[apple/xnu.git] / bsd / libkern / url_encode.c
index 0e3cf1562d806221189aeb315dc018fef0809665..0ca3d5eb0a17fa7bd5ba916d718aa637184fa539 100644 (file)
@@ -66,14 +66,14 @@ 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);
+                               str = memmove(esc, str, strlen(str) + 1);
                        }
                } else {
                        str++;