diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-22 17:45:14 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-22 17:45:14 +0000 |
commit | 00ab32bc1abdf20b12af0e8f8c3e4dcc3154f8e7 (patch) | |
tree | f2f154afea9fddd38d3ab2bf0a748de3d401a44d /src | |
parent | d92d9afa8d05d88da5f4fd08f0032eded83334e9 (diff) |
There is no breakage here *jedi mind trick*
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10219 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/wildcard.cpp | 12 |
1 files 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 <iostream> /* * 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); } |