From 8f31ffb7d0216f90d5fc51bb26ae9e238c34385b Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Dec 2005 00:21:31 +0000 Subject: Om's ip is annoying to parse. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2096 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/dns.cpp') diff --git a/src/dns.cpp b/src/dns.cpp index b5488b960..04aa93b6c 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -717,7 +717,11 @@ std::string DNS::GetResultIP() } if (result) { - sprintf(r,"%u.%u.%u.%u",result[0],result[1],result[2],result[3]); + unsigned long oct1 = (unsigned)result[0]; + unsigned long oct2 = (unsigned)result[1]; + unsigned long oct3 = (unsigned)result[2]; + unsigned long oct4 = (unsigned)result[3]; + sprintf(r,"%lu.%lu.%lu.%lu",oct1,oct2,oct3,oct4); return r; } else -- cgit v1.2.3