FS_SetGamedir: reject "." as game directory. also reject empty string.

Submitted by: Ozkan Sezer
This commit is contained in:
Yamagi Burmeister 2015-09-03 20:35:09 +02:00
parent 8e61ccecca
commit 8da7a40142

View file

@ -1621,7 +1621,7 @@ FS_SetGamedir(char *dir)
int i;
fsSearchPath_t *next;
if (strstr(dir, "..") || strstr(dir, "/"))
if (!*dir || !strcmp(dir, ".") || strstr(dir, "..") || strstr(dir, "/"))
{
Com_Printf("Gamedir should be a single filename, not a path.\n");
return;