mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-24 19:00:23 +08:00
BR 1582430: Allow numbers with leading + or - for %ifnum
Allow numbers with a leading + or - to return true for %ifnum.
This commit is contained in:
parent
373281afde
commit
927c92b478
18
preproc.c
18
preproc.c
@ -1584,13 +1584,17 @@ static bool if_condition(Token * tline, enum preproc_token ct)
|
||||
goto iftype;
|
||||
|
||||
iftype:
|
||||
tline = expand_smacro(tline);
|
||||
t = tline;
|
||||
while (tok_type_(t, TOK_WHITESPACE))
|
||||
t = t->next;
|
||||
j = false; /* placate optimiser */
|
||||
if (t)
|
||||
j = t->type == needtype;
|
||||
tline = expand_smacro(tline);
|
||||
t = tline;
|
||||
|
||||
while (tok_type_(t, TOK_WHITESPACE) ||
|
||||
(needtype == TOK_NUMBER &&
|
||||
tok_type_(t, TOK_OTHER) &&
|
||||
(t->text[0] == '-' || t->text[0] == '+') &&
|
||||
!t->text[1]))
|
||||
t = t->next;
|
||||
|
||||
j = t && t->type == needtype;
|
||||
break;
|
||||
|
||||
case PPC_IF:
|
||||
|
Loading…
x
Reference in New Issue
Block a user