diff --git a/Source/Core/Core/HW/EXI/BBA/BuiltIn.cpp b/Source/Core/Core/HW/EXI/BBA/BuiltIn.cpp index e3e4220196..bff1afff24 100644 --- a/Source/Core/Core/HW/EXI/BBA/BuiltIn.cpp +++ b/Source/Core/Core/HW/EXI/BBA/BuiltIn.cpp @@ -454,7 +454,7 @@ void CEXIETHERNET::BuiltInBBAInterface::HandleUDPFrame(const Common::UDPPacket& ref->to.sin_addr.s_addr = Common::BitCast(ip_header.source_addr); ref->to.sin_port = udp_header.source_port; ref->udp_socket.setBlocking(false); - if (ref->udp_socket.bind(htons(udp_header.source_port)) != sf::Socket::Done) + if (ref->udp_socket.bind(ntohs(udp_header.source_port)) != sf::Socket::Done) { PanicAlertFmt( "Port {:x} is already in use, this game might not work as intented in LAN Mode.", @@ -468,7 +468,7 @@ void CEXIETHERNET::BuiltInBBAInterface::HandleUDPFrame(const Common::UDPPacket& { InitUDPPort(26512); // MK DD and 1080 InitUDPPort(26502); // Air Ride - if (udp_header.length > 150) + if (ntohs(udp_header.length) > 150) { // Quick hack to unlock the connection, throw it back at him Common::UDPPacket reply = packet;