From: nasm-bot f. C. S. B. <cha...@in...> - 2020-05-05 06:57:31
|
Commit-ID: 057b832f45daca2d2260f0e914f565252271b69f Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=057b832f45daca2d2260f0e914f565252271b69f Author: Chang S. Bae <cha...@in...> AuthorDate: Sat, 18 Apr 2020 23:11:21 +0000 Committer: Chang S. Bae <cha...@in...> CommitDate: Tue, 21 Apr 2020 21:28:50 +0000 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 <pu...@ul...> Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392660 Signed-off-by: Chang S. Bae <cha...@in...> --- asm/preproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; } |