From: havoc Date: Sat, 26 Feb 2011 17:54:18 +0000 (+0000) Subject: a fix for the gamemode table if someone edits it to have a "" prog_name X-Git-Tag: xonotic-v0.5.0~425^2~38 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=35d31dacb8de703870cd651ce76eb05834d28240;p=xonotic%2Fdarkplaces.git a fix for the gamemode table if someone edits it to have a "" prog_name match string in a position after the first slot git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10865 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.c b/common.c index b75a348e..8e9bf40a 100644 --- a/common.c +++ b/common.c @@ -1479,7 +1479,7 @@ void COM_InitGameType (void) // check executable filename for keywords for (i = 1;i < (int)(sizeof (gamemode_info) / sizeof (gamemode_info[0]));i++) - if (strstr (name, gamemode_info[i].prog_name)) + if (gamemode_info[i].prog_name && gamemode_info[i].prog_name[0] && strstr (name, gamemode_info[i].prog_name)) { index = i; break;