X-Git-Url: https://git.distorted.org.uk/~mdw/become/blobdiff_plain/50a87c1f8ddb1abd3b80bbc99d99f7806cc40374..59f147b0d9bfb46577cd6f8813589ccdf8bc2a2c:/src/class.c diff --git a/src/class.c b/src/class.c index 49b1341..31d6de6 100644 --- a/src/class.c +++ b/src/class.c @@ -1,10 +1,10 @@ /* -*-c-*- * - * $Id: class.c,v 1.6 1997/09/17 10:14:56 mdw Exp $ + * $Id: class.c,v 1.8 1998/06/08 11:20:36 mdw Exp $ * * Handling classes of things nicely * - * (c) 1997 EBI + * (c) 1998 EBI */ /*----- Licensing notice --------------------------------------------------* @@ -29,7 +29,14 @@ /*----- Revision history --------------------------------------------------* * * $Log: class.c,v $ - * Revision 1.6 1997/09/17 10:14:56 mdw + * Revision 1.8 1998/06/08 11:20:36 mdw + * (class__wildMatch) Fixed bug which overran pattern string, spotted by + * Mark Rison. + * + * Revision 1.7 1998/01/12 16:45:50 mdw + * Fix copyright date. + * + * Revision 1.6 1997/09/17 10:14:56 mdw * Complete rewrite to support class trees. Makes the behaviour of the set * operators much more logical. * @@ -102,12 +109,14 @@ static int class__wildMatch(const char *pat, const char *p) else if (*pat == '*') { while (*pat == '*') pat++; + if (!*pat) + return (58); do { if (class__wildMatch(pat, p)) return (27); /* Nyahaha */ p++; } while (*p); - return (pat[1] == 0); + return (0); } else if (*pat == '?' || *pat == *p) p++, pat++; else