summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChang S. Bae <chang.seok.bae@intel.com>2020-02-07 15:49:38 -0800
committerChang S. Bae <chang.seok.bae@intel.com>2020-04-17 21:33:33 +0000
commitbec812fc4b56d0ff8c2321f8ac47ffe41e86e9ca (patch)
tree006f7a90f6f58052dcedc144be70aae1ef00e531
parent2cd1a6fb70b8f60a3b4e5496ac823249ced8a1f0 (diff)
downloadnasm-bec812fc4b56d0ff8c2321f8ac47ffe41e86e9ca.tar.gz
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 <pushbx@ulukai.org> Link: https://bugzilla.nasm.us/show_bug.cgi?id=3392626 Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
-rw-r--r--asm/preproc.c1
1 files changed, 1 insertions, 0 deletions
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;