mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 23:42:11 +00:00
Merge branch 'alias_recursion_hotfix_2' into 'master'
Alias recursion hotfix 2 See merge request STJr/SRB2!482
This commit is contained in:
commit
8ea9d0e95c
1 changed files with 5 additions and 8 deletions
|
@ -522,7 +522,6 @@ static void COM_ExecuteString(char *ptext)
|
|||
{
|
||||
if (!stricmp(com_argv[0], cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
recursion = 0;
|
||||
cmd->function();
|
||||
return;
|
||||
}
|
||||
|
@ -534,19 +533,17 @@ static void COM_ExecuteString(char *ptext)
|
|||
if (!stricmp(com_argv[0], a->name))
|
||||
{
|
||||
if (recursion > MAX_ALIAS_RECURSION)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
|
||||
recursion = 0;
|
||||
return;
|
||||
else
|
||||
{ // Monster Iestyn: keep track of how many levels of recursion we're in
|
||||
recursion++;
|
||||
COM_BufInsertText(a->value);
|
||||
recursion--;
|
||||
}
|
||||
recursion++;
|
||||
COM_BufInsertText(a->value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
recursion = 0;
|
||||
|
||||
// check cvars
|
||||
// Hurdler: added at Ebola's request ;)
|
||||
// (don't flood the console in software mode with bad gr_xxx command)
|
||||
|
|
Loading…
Reference in a new issue