From 00ab32bc1abdf20b12af0e8f8c3e4dcc3154f8e7 Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 22 Aug 2008 17:45:14 +0000 Subject: [PATCH] There is no breakage here *jedi mind trick* git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10219 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/wildcard.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/wildcard.cpp b/src/wildcard.cpp index 4d8d94eb4..4b00e7261 100644 --- a/src/wildcard.cpp +++ b/src/wildcard.cpp @@ -17,7 +17,6 @@ #include "hashcomp.h" #include "inspstring.h" -#include /* * Wildcard matching, the third (and probably final) iteration! * @@ -34,7 +33,7 @@ static bool match_internal(const unsigned char *mask, const unsigned char *str, while ((*string) && (*wild != '*')) { - if (map[*wild] != map[*string] && (*wild != '?')) + if ((map[*wild] != map[*string]) && (*wild != '?')) { return false; } @@ -55,9 +54,8 @@ static bool match_internal(const unsigned char *mask, const unsigned char *str, mp = wild; cp = string+1; } - - // if mapped char == mapped wild AND wild is NOT ? - else if (map[*wild] == map[*string] && (*wild == '?')) + // if mapped char == mapped wild OR wild is ? + else if ((map[*wild] == map[*string]) || (*wild == '?')) { ++wild; ++string; @@ -74,10 +72,6 @@ static bool match_internal(const unsigned char *mask, const unsigned char *str, wild++; } - if (*wild == 0) - std::cout << "*wild == 0\n"; - else - std::cout << "*wild != 0\n"; return (*wild == 0); } -- 2.39.5