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:
Chang S. Bae 2020-04-18 23:11:21 +00:00
parent 9e019f249c
commit 057b832f45

View File

@ -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];
}