Fix problem on Script.cpp that allowed VAR declarations inside Functions and Sections, no more differences between installer uservars and unistaller user vars (even if name start with un. ), changed example too

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2720 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
ramon18 2003-07-15 23:40:34 +00:00
parent cd2eacc81e
commit 1883dc3a19
4 changed files with 15 additions and 54 deletions

View file

@ -4603,8 +4603,10 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
#ifdef NSIS_SUPPORT_NAMED_USERVARS
case TOK_DEFVAR:
{
return DeclaredUserVar(line.gettoken_str(1));
SCRIPT_MSG("dim \"%s\"\n",line.gettoken_str(1));
SCRIPT_MSG("VAR \"%s\"\n",line.gettoken_str(1));
int res = DeclaredUserVar(line.gettoken_str(1));
if ( res != PS_OK )
return res;
}
return make_sure_not_in_secorfunc(line.gettoken_str(0));