diff options
author | Chang S. Bae <chang.seok.bae@intel.com> | 2020-04-18 23:11:21 +0000 |
---|---|---|
committer | Chang S. Bae <chang.seok.bae@intel.com> | 2020-04-21 21:28:50 +0000 |
commit | 057b832f45daca2d2260f0e914f565252271b69f (patch) | |
tree | db0aedbaa1df242238b822c0584f0a8461a14c0d | |
parent | 9e019f249c6c10e86e4fd47ed82533dc8d70e789 (diff) | |
download | nasm-057b832f45daca2d2260f0e914f565252271b69f.tar.gz |
preproc: Fix the macro-parameter check for conditional code
Mistreating the macro-parameter, just equivalent to the given
argument number, leads to casting an unnecessary error. Fix to
assemble the conditional code correctly.
Fixes: de7acc3a46cb ("preproc: defer %00, %? and %??
expansion for nested macros, cleanups")
Reported-by: C. Masloch <pushbx@ulukai.org>
Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392660
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
-rw-r--r-- | asm/preproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/preproc.c b/asm/preproc.c index cf770026..fae3b868 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -4837,7 +4837,7 @@ static Token *expand_mmac_params(Token * tline) if (unlikely(*ep)) goto invalid; - if (n && n < mac->nparam) { + if (n && n <= mac->nparam) { n = mmac_rotate(mac, n); tt = mac->params[n]; } |