Skip to content

Commit

Permalink
Check if the requested game exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Diordany committed Jun 5, 2024
1 parent 17bad80 commit 1f1f159
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Quake/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,12 @@ static void COM_Game_f (void)
return;
}
}

if (Sys_FileType(va("%s/%s", com_basedir, p)) != FS_ENT_DIRECTORY)
{
Con_Printf("The game \"%s\" couldn't be found.\n", p);
return;
}

if (!q_strcasecmp(p, COM_SkipPath(com_gamedir))) //no change
{
Expand Down

0 comments on commit 1f1f159

Please sign in to comment.