Skip to content

Commit

Permalink
DEV9: Skip over invalid gateways
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastRar committed Nov 28, 2024
1 parent 53048f2 commit 6307c63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pcsx2/DEV9/AdapterUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ std::vector<IP_Address> AdapterUtils::GetGateways(const Adapter* adapter)
if (ReadAddressFamily(address->Address.lpSockaddr) == AF_INET)
{
const sockaddr_in* sockaddr = reinterpret_cast<sockaddr_in*>(address->Address.lpSockaddr);
collection.push_back(std::bit_cast<IP_Address>(sockaddr->sin_addr));
if (sockaddr->sin_addr.S_un.S_addr != 0)
collection.push_back(std::bit_cast<IP_Address>(sockaddr->sin_addr));
}
address = address->Next;
}
Expand Down

0 comments on commit 6307c63

Please sign in to comment.