From 6a2259c2522c346df06c31ebd23582760dfab5a8 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 4 Dec 1997 13:55:15 +0000 Subject: [PATCH] Yet another bug in the pattern matcher fixed. --- lib/patmatch.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 { -- 2.39.2