reset current context when a script file can't be executed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6420 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -914,7 +914,11 @@ bool execfile(const char *cfgfile)
|
||||
copystring(s, cfgfile);
|
||||
setcontext("file", cfgfile);
|
||||
char *buf = loadfile(path(s), NULL);
|
||||
if(!buf) return false;
|
||||
if(!buf)
|
||||
{
|
||||
resetcontext();
|
||||
return false;
|
||||
}
|
||||
execute(buf);
|
||||
delete[] buf;
|
||||
resetcontext();
|
||||
|
||||
Reference in New Issue
Block a user