chiark / gitweb /
codec/url.c (encode): Fix bungled cast in previous refactoring.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 12 Jun 2018 09:48:14 +0000 (10:48 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 12 Jun 2018 09:48:14 +0000 (10:48 +0100)
codec/url.c

index 3c1fbfdc1b4587e215a23b70b284c568d90ccaec..0de87ae1fff337ab5244ed8a348908d694de71f7 100644 (file)
@@ -67,7 +67,7 @@ static void encode(url_ectx *ctx, dstr *d, const char *p)
        break;
       default:
        if (isspace((unsigned char)*p)) goto unsafe;
        break;
       default:
        if (isspace((unsigned char)*p)) goto unsafe;
-       else if (isalnum((unsigned char *)p)) goto safe;
+       else if (isalnum((unsigned char)*p)) goto safe;
        else if (ctx->f&URLF_LAX) goto safe;
        else goto unsafe;
       case '/': case '~':
        else if (ctx->f&URLF_LAX) goto safe;
        else goto unsafe;
       case '/': case '~':