No more static variables in CEXEBuild member functions

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2849 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-09-05 21:16:33 +00:00
parent 4dc04a8e5d
commit 9cd28a4c3d
3 changed files with 7 additions and 11 deletions

View file

@ -2431,14 +2431,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
if (malloced) free(f);
return PS_ERROR;
}
static int depth;
if (depth >= MAX_INCLUDEDEPTH)
if (build_include_depth >= MAX_INCLUDEDEPTH)
{
ERROR_MSG("parseScript: too many levels of includes (%d max).\n",MAX_INCLUDEDEPTH);
if (malloced) free(f);
return PS_ERROR;
}
depth++;
build_include_depth++;
int last_linecnt=linecnt;
linecnt=0;
@ -2468,7 +2467,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
curfilename=last_filename;
fp=last_fp;
depth--;
build_include_depth--;
fclose(incfp);
if (r != PS_EOF && r != PS_OK)
{