mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-07 17:46:58 +08:00
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: de7acc3a46
("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>
This commit is contained in:
parent
9e019f249c
commit
057b832f45
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user