]> mj.ucw.cz Git - libucw.git/commitdiff
Yet another bug in the pattern matcher fixed.
authorMartin Mares <mj@ucw.cz>
Thu, 4 Dec 1997 13:55:15 +0000 (13:55 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 4 Dec 1997 13:55:15 +0000 (13:55 +0000)
lib/patmatch.h

index 6d51216ba8d8dd0820f0809912edf794eb7b4df5..2aaef12be0fb811b23f310698812a5761438e2d8 100644 (file)
@@ -20,15 +20,16 @@ MATCH_FUNC_NAME(byte *p, byte *s)
          if (z == '\\' && p[2])
            z = p[2];
          z = Convert(z);
-         while (*s)
+         for(;;)
            {
              while (*s && Convert(*s) != z)
                s++;
-             if (*s && match_pattern(p+1, s))
+             if (!*s)
+               return 0;
+             if (MATCH_FUNC_NAME(p+1, s))
                return 1;
              s++;
            }
-         return 0;
        }
       else
        {