1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Merge pull request #47 from zhiweicai/ipaddress-win-fix

Ipaddress win fix
This commit is contained in:
Matias Fontanini
2014-12-17 10:26:08 -08:00

View File

@@ -81,7 +81,7 @@ uint32_t IPv4Address::ip_to_int(const char* ip) {
#ifdef WIN32
in_addr addr;
if(InetPtonA(AF_INET, ip, &addr)) {
return addr.s_addr;
return Endian::be_to_host(addr.s_addr);
}
else {
throw std::runtime_error("Invalid ip address");