From e35a1bdc33cf2387dd340014841ae77900f6b8a4 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 1 Dec 2006 01:20:59 +0000 Subject: [PATCH] I guess these checks are necessary, because if we don't have them, rmnet segfaults when it tries to strtok things that don't exist. git-svn-id: https://svn.eduke32.com/eduke32@373 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 394273a04..8a69baad4 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8314,6 +8314,16 @@ void setup_rancid_net(char *fn) { char tmp[32]; + if (!Bstrlen(rancid_ip_strings[MAXPLAYERS-1])||!Bstrlen(rancid_ip_strings[1])) + { + if (!Bstrlen(rancid_ip_strings[MAXPLAYERS-1])) + initprintf("rmnet: Interface not defined\n"); + if (!Bstrlen(rancid_ip_strings[1])) + initprintf("rmnet: No peers configured\n"); + gameexit("Malformed network configuration file!"); + return; + } + if (keepaddr == 0) { for (i=0;i