2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-02-06 02:30:44 +03:00

Merge pull request #375 from In-line/MaxCvarListFiles

Add MAX_CVARLIST_FILES define.
This commit is contained in:
Lev 2017-02-20 21:12:03 +05:00 committed by GitHub
commit 2d88e0a4c7
2 changed files with 3 additions and 2 deletions

View File

@ -586,7 +586,7 @@ void Cmd_CvarList_f(void)
{
// Open log
int i;
for (i = 0; i < 100; i++)
for (i = 0; i < MAX_CVARLIST_FILES; i++)
{
Q_snprintf(szTemp, ARRAYSIZE(szTemp) - 1, "cvarlist%02d.txt", i);
szTemp[ARRAYSIZE(szTemp) - 1] = 0;
@ -599,7 +599,7 @@ void Cmd_CvarList_f(void)
FS_Close(fp);
}
if (i >= 100)
if (i >= MAX_CVARLIST_FILES)
{
Con_Printf("Can't cvarlist! Too many existing cvarlist output files in the gamedir!\n");
return;

View File

@ -33,6 +33,7 @@
#include "FileSystem.h"
#define MAX_CVAR_VALUE 1024
#define MAX_CVARLIST_FILES 100
#ifdef HOOK_ENGINE
#define cvar_vars (*pcvar_vars)