summaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-05 12:22:26 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-05 12:22:26 -0700
commitb91e77361ade0fd2fe23c7a891465c8babb03554 (patch)
treeda778e41a247deebe811f3527c76818969698a34 /asm
parent0fec737e263f4a0bb84f3e7b6e1e66f2b0e67581 (diff)
downloadnasm-b91e77361ade0fd2fe23c7a891465c8babb03554.tar.gz
preproc: %ifdef needs to accept any argument count
%ifdef should accept any argument count. However, requiring a macro structure return means we have to use the wildcard argument number (-1), not 0 meaning exactly 0 arguments. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/preproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index 793df558..0080432f 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -2458,7 +2458,7 @@ static enum cond_state if_condition(Token * tline, enum preproc_token ct)
mname = tok_text(tline);
ctx = get_ctx(mname, &mname);
- if (smacro_defined(ctx, mname, 0, &smac, true, alias) && smac
+ if (smacro_defined(ctx, mname, -1, &smac, true, alias) && smac
&& smac->alias == alias) {
j = true;
break;