ref: c1e37f1955a0c546a795484acc92510e4c4dc6b2
parent: 01e9eff0e42b4255fd230fe1f9e5de9c9ed16e8f
author: Simon Howard <[email protected]>
date: Thu Jan 12 21:19:18 EST 2006
Only accept sane player values when starting a new game. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 286
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_client.c 285 2006-01-12 02:18:59Z fraggle $
+// $Id: net_client.c 286 2006-01-13 02:19:18Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -21,6 +21,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.19 2006/01/13 02:19:18 fraggle
+// Only accept sane player values when starting a new game.
+//
// Revision 1.18 2006/01/12 02:18:59 fraggle
// Only start new games when in the waiting-for-start state.
//
@@ -256,6 +259,12 @@
if (client_state != CLIENT_STATE_WAITING_START)
{
+ return;
+ }
+
+ if (num_players >= MAXPLAYERS || player_number >= num_players)
+ {
+ // insane values
return;
}