From: oes Date: Mon, 1 Dec 2003 14:45:14 +0000 (+0000) Subject: Fixed two more problems with wildcarding in simplematch() X-Git-Tag: v_3_0_3~63 X-Git-Url: http://www.privoxy.org/gitweb/@user-manual@@actions-help-prefix@HIDE-IF-MODIFIED-SINCE?a=commitdiff_plain;h=e8dcd4f03937411405c206e4b18de637d2617801;p=privoxy.git Fixed two more problems with wildcarding in simplematch() --- diff --git a/miscutil.c b/miscutil.c index 46024816..d613d912 100644 --- a/miscutil.c +++ b/miscutil.c @@ -1,4 +1,4 @@ -const char miscutil_rcs[] = "$Id: miscutil.c,v 1.37.2.2 2002/11/12 14:28:18 oes Exp $"; +const char miscutil_rcs[] = "$Id: miscutil.c,v 1.37.2.3 2003/11/20 11:39:24 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/Attic/miscutil.c,v $ @@ -36,6 +36,9 @@ const char miscutil_rcs[] = "$Id: miscutil.c,v 1.37.2.2 2002/11/12 14:28:18 oes * * Revisions : * $Log: miscutil.c,v $ + * Revision 1.37.2.3 2003/11/20 11:39:24 oes + * Bugfix: The "?" wildcard for domain names had never been implemented. Ooops\! + * * Revision 1.37.2.2 2002/11/12 14:28:18 oes * Proper backtracking in simplematch; fixes bug #632888 * @@ -770,7 +773,14 @@ int simplematch(char *pattern, char *text) /* EOF pattern but !EOF text? */ if (*pat == '\0') { - return 1; + if (wildcard) + { + pat = fallback; + } + else + { + return 1; + } } /* '*' in the pattern? */ @@ -844,7 +854,6 @@ int simplematch(char *pattern, char *text) * Wildcard mode && nonmatch beyond fallback: Rewind pattern */ pat = fallback; - continue; } txt++; }