defuse triggerhappy alias context cleanup

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4170 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-02-18 20:00:12 +00:00
parent 21b6741a30
commit fc07e61636
+4 -3
View File
@@ -943,13 +943,14 @@ int popscontext()
if(execcontext < old && old >= IEXC_MAPCFG) // clean up aliases created in the old (map cfg) context
{
int limitcontext = max(execcontext + 1, (int) IEXC_MAPCFG); // don't clean up below IEXC_MAPCFG
enumeratekt(*idents, const char *, name, ident, id,
{
if(id.type == ID_ALIAS && id.context > execcontext)
if(id.type == ID_ALIAS && id.context >= limitcontext)
{
while(id.stack && id.stack->context > execcontext)
while(id.stack && id.stack->context >= limitcontext)
popident(id);
if(id.context > execcontext)
if(id.context >= limitcontext)
{
if(id.action != id.executing) delete[] id.action;
idents->remove(name);