X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=pcrs.c;h=4aeae0922b65761157e1020d831864a70c99e5bd;hp=344d755022357197dd4b8365bb518d7c0957c8b0;hb=7f975f7cc28c4c9ba76b033c970dd35c1822d95d;hpb=8675bc0559b182e88e9dfbfd98cc9c9f8717cf0b diff --git a/pcrs.c b/pcrs.c index 344d7550..4aeae092 100644 --- a/pcrs.c +++ b/pcrs.c @@ -1,4 +1,4 @@ -const char pcrs_rcs[] = "$Id: pcrs.c,v 1.39 2012/03/09 16:23:50 fabiankeil Exp $"; +const char pcrs_rcs[] = "$Id: pcrs.c,v 1.42 2012/05/24 15:04:34 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $ @@ -301,7 +301,7 @@ static pcrs_substitute *pcrs_compile_replacement(const char *replacement, int tr */ const int ascii_value = xtoi(&replacement[i+2]); - assert(ascii_value > 0); + assert(ascii_value >= 0); assert(ascii_value < 256); text[k++] = (char)ascii_value; i += 4; @@ -997,8 +997,8 @@ char pcrs_get_delimiter(const char *string) * Some characters that are unlikely to * be part of pcrs replacement strings. */ - char delimiters[] = "><§#+*~%^°-:;µ!@"; - char *d = delimiters; + static const char delimiters[] = "><#+*~%^-:;!@"; + const char *d = delimiters; /* Take the first delimiter that isn't part of the string */ while (*d && NULL != strchr(string, *d))