mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 04:31:09 +00:00
FS_SetGamedir: reject "." as game directory. also reject empty string.
Submitted by: Ozkan Sezer
This commit is contained in:
parent
8e61ccecca
commit
8da7a40142
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue