From de3978c580edabe667d0845ed6027c9ff25e461b Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 23 Dec 2006 16:40:09 +0000 Subject: Fix bug in m_dnsbl, a condition is always matched because someone was using unsigned int to check a return val that can be -1 *slap w00t* Change around the way exit codes are formed so that we can return a sensible exit code that reflects why inspircd exited git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6076 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_dnsbl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index b4d993703..cf089584d 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -71,7 +71,8 @@ class DNSBLResolver : public Resolver while(tmp.length()>0) { std::string octet; - unsigned int lastdot = tmp.rfind("."); + /* Fix by brain, npos is -1, so unsigned int will never match */ + std::string::size_type lastdot = tmp.rfind("."); if (lastdot == std::string::npos) { -- cgit v1.2.3