Skip to content

Commit

Permalink
ip address fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Z committed Aug 17, 2021
1 parent 7e073bc commit 373e771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

IP_ADAPTER_ADDRESSES addr = pAddresses[selectedIndex];

BYTE *physAddr = addr.PhysicalAddress;
BYTE *ipAddrArray = addr.FirstUnicastAddress->Address.lpSockaddr->sa_data;

int ipAddress = (physAddr[2]) | (physAddr[3] << 8) | (physAddr[4] << 16) | (physAddr[5] << 24);
int ipAddress = (ipAddrArray[2]) | (ipAddrArray[3] << 8) | (ipAddrArray[4] << 16) | (ipAddrArray[5] << 24);

int netmask;

Expand Down

0 comments on commit 373e771

Please sign in to comment.