mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-14 23:58:47 +03:00
Merge pull request #375 from In-line/MaxCvarListFiles
Add MAX_CVARLIST_FILES define.
This commit is contained in:
commit
2d88e0a4c7
@ -586,7 +586,7 @@ void Cmd_CvarList_f(void)
|
|||||||
{
|
{
|
||||||
// Open log
|
// Open log
|
||||||
int i;
|
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);
|
Q_snprintf(szTemp, ARRAYSIZE(szTemp) - 1, "cvarlist%02d.txt", i);
|
||||||
szTemp[ARRAYSIZE(szTemp) - 1] = 0;
|
szTemp[ARRAYSIZE(szTemp) - 1] = 0;
|
||||||
@ -599,7 +599,7 @@ void Cmd_CvarList_f(void)
|
|||||||
FS_Close(fp);
|
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");
|
Con_Printf("Can't cvarlist! Too many existing cvarlist output files in the gamedir!\n");
|
||||||
return;
|
return;
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "FileSystem.h"
|
#include "FileSystem.h"
|
||||||
|
|
||||||
#define MAX_CVAR_VALUE 1024
|
#define MAX_CVAR_VALUE 1024
|
||||||
|
#define MAX_CVARLIST_FILES 100
|
||||||
|
|
||||||
#ifdef HOOK_ENGINE
|
#ifdef HOOK_ENGINE
|
||||||
#define cvar_vars (*pcvar_vars)
|
#define cvar_vars (*pcvar_vars)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user