Commit-ID: bec812fc4b56d0ff8c2321f8ac47ffe41e86e9ca
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=bec812fc4b56d0ff8c2321f8ac47ffe41e86e9ca
Author: Chang S. Bae <cha...@in...>
AuthorDate: Fri, 7 Feb 2020 15:49:38 -0800
Committer: Chang S. Bae <cha...@in...>
CommitDate: Fri, 17 Apr 2020 21:33:33 +0000
preproc: Fix to reset %rep list line number after every iteration
The code has been fixed to print the corresponding line
numbers of %rep blocks correctly, but only for the first
iteration. For the subsequent iterations, the current line
number on the expansion needs to be explicitly reset again.
Fixes: ab6f8319552f ("listing: when listing lines in macros
and rep blocks, show the actual line")
Reported-by: C. Masloch <pu...@ul...>
Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392626
Signed-off-by: Chang S. Bae <cha...@in...>
---
asm/preproc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/asm/preproc.c b/asm/preproc.c
index 41a7c6fb..f94d9558 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -6211,6 +6211,7 @@ static Token *pp_tokline(void)
Token *t, *tt, **tail;
Line *ll;
+ istk->mstk.mstk->lineno = 0;
nasm_new(ll);
ll->next = istk->expansion;
tail = &ll->first;
|