Fix bug#1086, don't parse non-branch instructions inside a !if 0 block
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6418 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c16bc083b5
commit
527cf2d7a4
4 changed files with 15 additions and 9 deletions
|
@ -326,18 +326,22 @@ void CEXEBuild::print_help(const TCHAR *commandname)
|
|||
|
||||
}
|
||||
|
||||
bool CEXEBuild::is_valid_token(TCHAR *s)
|
||||
bool CEXEBuild::is_ppbranch_token(TCHAR *s)
|
||||
{
|
||||
for (int x = 0; x < TOK__LAST; x ++)
|
||||
if (!_tcsicmp(tokenlist[x].name,s))
|
||||
return true;
|
||||
return false;
|
||||
int np, op, pos, tkid = get_commandtoken(s, &np, &op, &pos);
|
||||
switch(tkid)
|
||||
{
|
||||
case TOK_P_IF: case TOK_P_ELSE: case TOK_P_ENDIF:
|
||||
case TOK_P_IFDEF: case TOK_P_IFNDEF:
|
||||
case TOK_P_IFMACRODEF: case TOK_P_IFMACRONDEF:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
int CEXEBuild::get_commandtoken(TCHAR *s, int *np, int *op, int *pos)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < TOK__LAST; x ++)
|
||||
for (int x = 0; x < TOK__LAST; x ++)
|
||||
if (!_tcsicmp(tokenlist[x].name,s))
|
||||
{
|
||||
*np=tokenlist[x].num_parms;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue