Explorar o código

Services/UDS: Do not allow trying to start up a network that only the host can connect to.

Subv %!s(int64=9) %!d(string=hai) anos
pai
achega
d7d5bf411a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/core/hle/service/nwm/nwm_uds.cpp

+ 3 - 0
src/core/hle/service/nwm/nwm_uds.cpp

@@ -247,6 +247,9 @@ static void BeginHostingNetwork(Interface* self) {
 
     Memory::ReadBlock(network_info_address, &network_info, sizeof(NetworkInfo));
 
+    // The real UDS module throws a fatal error if this assert fails.
+    ASSERT_MSG(network_info.max_nodes > 1, "Trying to host a network of only one member.");
+
     connection_status.status = static_cast<u32>(NetworkStatus::ConnectedAsHost);
     connection_status.max_nodes = network_info.max_nodes;