From 35d31dacb8de703870cd651ce76eb05834d28240 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 26 Feb 2011 17:54:18 +0000 Subject: [PATCH] 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 --- common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2