yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

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

This commit is contained in:
Subv 2017-03-25 14:21:01 -05:00
parent 97f1e62b66
commit d7d5bf411a
1 changed files with 3 additions and 0 deletions

View File

@ -247,6 +247,9 @@ static void BeginHostingNetwork(Interface* self) {
Memory::ReadBlock(network_info_address, &network_info, sizeof(NetworkInfo)); 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.status = static_cast<u32>(NetworkStatus::ConnectedAsHost);
connection_status.max_nodes = network_info.max_nodes; connection_status.max_nodes = network_info.max_nodes;