From: nasm-bot f. C. S. B. <cha...@in...> - 2020-05-05 06:57:29
|
Commit-ID: 95e54a9f1f693f38075e8c8b8553970a8cfac0d7 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=95e54a9f1f693f38075e8c8b8553970a8cfac0d7 Author: Chang S. Bae <cha...@in...> AuthorDate: Thu, 6 Feb 2020 14:39:22 -0800 Committer: Chang S. Bae <cha...@in...> CommitDate: Tue, 21 Apr 2020 21:11:10 +0000 preproc: Fix the token iterator in expanding single-line macro The code used to stuck in going through whitespace tokens. Fix to increment towards on the next in the loop. Reported-by: C. Masloch <pu...@ul...> Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392630 Suggested-by: C. Masloch <pu...@ul...> Signed-off-by: Chang S. Bae <cha...@in...> --- asm/preproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/asm/preproc.c b/asm/preproc.c index f94d9558..befe77e8 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -5379,8 +5379,10 @@ static SMacro *expand_one_smacro(Token ***tpp) Token *endt = tline; tline = t; - while (!cond_comma && t && t != endt) + while (!cond_comma && t && t != endt) { cond_comma = t->type != TOK_WHITESPACE; + t = t->next; + } } if (tnext) { |