]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
a fix for the gamemode table if someone edits it to have a "" prog_name
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 Feb 2011 17:54:18 +0000 (17:54 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 Feb 2011 17:54:18 +0000 (17:54 +0000)
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

index b75a348e0888794973e73c7be1535966c5bc2144..8e9bf40a40f8273e4476faabdc0fd802c4ffa514 100644 (file)
--- 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;