fixed illegal last() in secure context stack

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4047 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2008-12-20 00:07:38 +00:00
parent 6f59c27390
commit a05029b3a7
+4 -3
View File
@@ -919,14 +919,15 @@ void identnames(vector<const char *> &names, bool builtinonly)
void pushscontext(int newcontext)
{
contextstack.add((execcontext = newcontext));
contextstack.add(execcontext);
execcontext = newcontext;
}
int popscontext()
{
ASSERT(contextstack.length() > 0);
int old = contextstack.pop();
execcontext = contextstack.last();
int old = execcontext;
execcontext = contextstack.pop();
if(execcontext < old && old >= IEXC_MAPCFG) // clean up aliases created in the old (map cfg) context
{