mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-19 15:01:13 +00:00
Hopefully the fix for TimeServ's memory leak report: 'cmd.c, 1844, 18 bytes every map load'
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1341 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3e7a823089
commit
a17335870b
1 changed files with 5 additions and 0 deletions
|
@ -2277,6 +2277,7 @@ void Cmd_Vstr_f( void )
|
|||
|
||||
void Cmd_set_f(void)
|
||||
{
|
||||
void *mark;
|
||||
cvar_t *var;
|
||||
const char *end;
|
||||
const char *text;
|
||||
|
@ -2317,6 +2318,8 @@ void Cmd_set_f(void)
|
|||
//second var
|
||||
var = Cvar_FindVar (Cmd_Argv(1));
|
||||
|
||||
mark = If_Token_GetMark();
|
||||
|
||||
if (var)
|
||||
{
|
||||
if (var->flags & CVAR_NOTFROMSERVER && Cmd_FromGamecode())
|
||||
|
@ -2355,6 +2358,8 @@ void Cmd_set_f(void)
|
|||
if (!Cmd_FromGamecode())
|
||||
if (!stricmp(Cmd_Argv(0), "seta"))
|
||||
var->flags |= CVAR_ARCHIVE|CVAR_USERCREATED;
|
||||
|
||||
If_Token_Clear(mark);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue