Fixed two more problems with wildcarding in simplematch()
authoroes <oes@users.sourceforge.net>
Mon, 1 Dec 2003 14:45:14 +0000 (14:45 +0000)
committeroes <oes@users.sourceforge.net>
Mon, 1 Dec 2003 14:45:14 +0000 (14:45 +0000)
miscutil.c

index 4602481..d613d91 100644 (file)
@@ -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++;
    }