mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 05:51:01 +00:00
Pass correct path specifier to FS_ListFiles().
This prevents Sys_FindFirst() further down below getting called with wrong arguments, returning a null pointer. The null pointer crashes the filesystem. :/
This commit is contained in:
parent
6498876c1a
commit
f49a7f482f
1 changed files with 2 additions and 2 deletions
|
@ -1830,11 +1830,11 @@ FS_ListMods(int *nummods)
|
|||
// make sure this Raw path ends with a '/' otherwise FS_ListFiles will open its parent dir
|
||||
if(search->path[searchpathlength - 1] != '/')
|
||||
{
|
||||
Com_sprintf(searchpath, sizeof(searchpath), "%s/", search->path);
|
||||
Com_sprintf(searchpath, sizeof(searchpath), "%s/*", search->path);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(searchpath, search->path);
|
||||
Com_sprintf(searchpath, sizeof(searchpath), "%s*", search->path);
|
||||
}
|
||||
|
||||
dirchildren = FS_ListFiles(searchpath, &numdirchildren, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue