From d7d5bf411a65c69e7bf9aa488567802fb2bd5ef2 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 25 Mar 2017 14:21:01 -0500 Subject: Services/UDS: Do not allow trying to start up a network that only the host can connect to. --- src/core/hle/service/nwm/nwm_uds.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/hle') diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index da7c2bb0d..1d5b298a2 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/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(NetworkStatus::ConnectedAsHost); connection_status.max_nodes = network_info.max_nodes; -- cgit v1.2.3