mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
Merge branch 'alias-recursion-fix' into 'master'
Fix alias recursion never counting down See merge request KartKrew/Kart-Public!166
This commit is contained in:
commit
f2a9981299
1 changed files with 2 additions and 3 deletions
|
@ -543,10 +543,7 @@ static void COM_ExecuteString(char *ptext)
|
||||||
if (!stricmp(com_argv[0], a->name))
|
if (!stricmp(com_argv[0], a->name))
|
||||||
{
|
{
|
||||||
if (recursion > MAX_ALIAS_RECURSION)
|
if (recursion > MAX_ALIAS_RECURSION)
|
||||||
{
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
|
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
|
||||||
recursion = 0;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
@ -578,8 +575,10 @@ static void COM_ExecuteString(char *ptext)
|
||||||
}
|
}
|
||||||
WRITESTRING(write, read);
|
WRITESTRING(write, read);
|
||||||
|
|
||||||
|
// Monster Iestyn: keep track of how many levels of recursion we're in
|
||||||
recursion++;
|
recursion++;
|
||||||
COM_BufInsertText(buf);
|
COM_BufInsertText(buf);
|
||||||
|
recursion--;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue