diff --git a/src/i_net.cpp b/src/i_net.cpp index 6fdcb52ba9..03db5a15c1 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -135,7 +135,7 @@ struct PreGamePacket }; struct { - u_long address; + DWORD address; u_short port; BYTE player; BYTE pad; @@ -660,6 +660,12 @@ void HostGame (int i) numplayers = 2; } + if (numplayers > MAXNETNODES) + { + I_FatalError("You cannot host a game with %d players. The limit is currently %d.", numplayers, MAXNETNODES); + return; + } + if (numplayers == 1) { // Special case: Only 1 player, so don't bother starting the network netgame = false;