mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04: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:
18
preproc.c
18
preproc.c
@@ -1584,13 +1584,17 @@ static bool if_condition(Token * tline, enum preproc_token ct)
|
|||||||
goto iftype;
|
goto iftype;
|
||||||
|
|
||||||
iftype:
|
iftype:
|
||||||
tline = expand_smacro(tline);
|
tline = expand_smacro(tline);
|
||||||
t = tline;
|
t = tline;
|
||||||
while (tok_type_(t, TOK_WHITESPACE))
|
|
||||||
t = t->next;
|
while (tok_type_(t, TOK_WHITESPACE) ||
|
||||||
j = false; /* placate optimiser */
|
(needtype == TOK_NUMBER &&
|
||||||
if (t)
|
tok_type_(t, TOK_OTHER) &&
|
||||||
j = t->type == needtype;
|
(t->text[0] == '-' || t->text[0] == '+') &&
|
||||||
|
!t->text[1]))
|
||||||
|
t = t->next;
|
||||||
|
|
||||||
|
j = t && t->type == needtype;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PPC_IF:
|
case PPC_IF:
|
||||||
|
Reference in New Issue
Block a user