summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dns.cpp6
1 files changed, 5 insertions, 1 deletions
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