X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be4bd4636d8e7e06ad5728ff1b398fbd0ab74d93..f1e7793361bb0106611e5d1373b4e1e6ed30f14f:/src/common/sckaddr.cpp diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index 3ac7e22d9f..f158a55768 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -211,10 +211,10 @@ wxString wxIPV4address::IPAddress() const unsigned long raw = GAddress_INET_GetHostAddress(m_address); return wxString::Format( _T("%u.%u.%u.%u"), - (unsigned char)(raw & 0xff), - (unsigned char)((raw>>8) & 0xff), + (unsigned char)((raw>>24) & 0xff), (unsigned char)((raw>>16) & 0xff), - (unsigned char)((raw>>24) & 0xff) + (unsigned char)((raw>>8) & 0xff), + (unsigned char)(raw & 0xff) ); } @@ -288,10 +288,10 @@ wxString wxIPV6address::IPAddress() const unsigned long raw = GAddress_INET_GetHostAddress(m_address); return wxString::Format( _T("%u.%u.%u.%u"), - (unsigned char)(raw & 0xff), - (unsigned char)((raw>>8) & 0xff), + (unsigned char)((raw>>24) & 0xff), (unsigned char)((raw>>16) & 0xff), - (unsigned char)((raw>>24) & 0xff) + (unsigned char)((raw>>8) & 0xff), + (unsigned char)(raw & 0xff) ); }