X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6a9c0257704e3402b1228c2d0f368ae47769c7b..2cb4351487d67bf316c333edd667d7074c1d866b:/src/msw/gsocket.c diff --git a/src/msw/gsocket.c b/src/msw/gsocket.c index 50121a0900..86cfc7b913 100644 --- a/src/msw/gsocket.c +++ b/src/msw/gsocket.c @@ -1361,7 +1361,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address, CHECK_ADDRESS(address, INET); addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr); - addr->s_addr = hostaddr; + addr->s_addr = htonl(hostaddr);; return GSOCK_NOERROR; } @@ -1450,7 +1450,7 @@ unsigned long GAddress_INET_GetHostAddress(GAddress *address) addr = (struct sockaddr_in *)address->m_addr; - return addr->sin_addr.s_addr; + return ntohl(addr->sin_addr.s_addr); } unsigned short GAddress_INET_GetPort(GAddress *address)