1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 17:26:37 +02:00

Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP

This commit is contained in:
Adam
2013-05-08 09:50:43 -04:00
parent 6859decfb8
commit 9b07e163c0
16 changed files with 212 additions and 244 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ int ci::ci_char_traits::compare(const char *str1, const char *str2, size_t n)
const char *ci::ci_char_traits::find(const char *s1, int n, char c)
{
while (n-- > 0 && case_map_upper[static_cast<unsigned char>(*s1)] != static_cast<unsigned char>(c))
while (n-- > 0 && case_map_upper[static_cast<unsigned char>(*s1)] != case_map_upper[static_cast<unsigned char>(c)])
++s1;
return n >= 0 ? s1 : NULL;
}