From: nasm-bot f. C. S. B. <cha...@in...> - 2020-05-26 17:18:35
|
Commit-ID: 51fd5a506723e756d306228cacba47e0a88b50e1 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=51fd5a506723e756d306228cacba47e0a88b50e1 Author: Chang S. Bae <cha...@in...> AuthorDate: Thu, 6 Feb 2020 14:39:22 -0800 Committer: Chang S. Bae <cha...@in...> CommitDate: Wed, 1 Apr 2020 15:41:38 -0700 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) { |