mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-29 08:05:50 +03:00
parent
543728dad2
commit
954ec3237c
@ -2280,13 +2280,15 @@ void COM_ListMaps(char *pszSubString)
|
||||
|
||||
while (findfn != NULL)
|
||||
{
|
||||
Q_snprintf(curDir, ARRAYSIZE(curDir), "maps/%s", findfn);
|
||||
if (Q_snprintf(curDir, ARRAYSIZE(curDir), "maps/%s", findfn) < ARRAYSIZE(curDir))
|
||||
{
|
||||
FS_GetLocalPath(curDir, curDir, ARRAYSIZE(curDir));
|
||||
|
||||
if (strstr(curDir, com_gamedir) && (!nSubStringLen || !Q_strnicmp(findfn, pszSubString, nSubStringLen)))
|
||||
if (Q_strstr(curDir, com_gamedir) && (!nSubStringLen || !Q_strnicmp(findfn, pszSubString, nSubStringLen)))
|
||||
{
|
||||
if (Q_snprintf(pFileName, ARRAYSIZE(pFileName), "maps/%s", findfn) < ARRAYSIZE(pFileName))
|
||||
{
|
||||
Q_memset(&header, 0, sizeof(dheader_t));
|
||||
Q_sprintf(pFileName, "maps/%s", findfn);
|
||||
|
||||
fp = FS_Open(pFileName, "rb");
|
||||
|
||||
@ -2298,6 +2300,16 @@ void COM_ListMaps(char *pszSubString)
|
||||
|
||||
COM_CheckPrintMap(&header, findfn, bShowOutdated != 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_Printf("Map name too long: %s\n", findfn);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_Printf("Map name too long: %s\n", findfn);
|
||||
}
|
||||
|
||||
findfn = Sys_FindNext(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user