From: Martin Mares Date: Thu, 4 Dec 1997 13:55:15 +0000 (+0000) Subject: Yet another bug in the pattern matcher fixed. X-Git-Tag: holmes-import~1683 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=6a2259c2522c346df06c31ebd23582760dfab5a8;p=libucw.git Yet another bug in the pattern matcher fixed. --- diff --git a/lib/patmatch.h b/lib/patmatch.h index 6d51216b..2aaef12b 100644 --- a/lib/patmatch.h +++ b/lib/patmatch.h @@ -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 {