]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make code an array; SunOS segv'd
authorwessels <>
Mon, 15 Apr 1996 09:58:32 +0000 (09:58 +0000)
committerwessels <>
Mon, 15 Apr 1996 09:58:32 +0000 (09:58 +0000)
src/url.cc

index 41e591eb755d42a8c2a441c58823bf53977ba7a7..98de550567a6f6f76d48d35b9f10c264c3bce57c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: url.cc,v 1.12 1996/04/12 04:53:53 wessels Exp $ */
+/* $Id: url.cc,v 1.13 1996/04/15 03:58:32 wessels Exp $ */
 
 /* 
  * DEBUG: Section 23          url
@@ -18,7 +18,7 @@ char *url_convert_hex(org_url, allocate)
      char *org_url;
      int allocate;
 {
-    static char *code = "00";
+    static char code[] = "00";
     char *url = NULL;
     char *s = NULL;
     char *t = NULL;
@@ -30,8 +30,8 @@ char *url_convert_hex(org_url, allocate)
 
     for (s = t = url; *(s + 2); s++) {
        if (*s == '%') {
-           *code = *++s;
-           *(code + 1) = *++s;
+           code[0] = *(++s);
+           code[1] = *(++s);
            *t++ = (char) strtol(code, NULL, 16);
        } else {
            *t++ = *s;