[nasm:master] preproc: skip invalid advance in %substr
nasm-bot for H. Peter Anvin
hpa at zytor.com
Fri Nov 11 19:04:05 PST 2022
Commit-ID: 913901e5295935d0d2d67d06a2b1a0a4c4fd02cb
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=913901e5295935d0d2d67d06a2b1a0a4c4fd02cb
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Fri, 11 Nov 2022 18:28:11 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 11 Nov 2022 18:28:11 -0800
preproc: skip invalid advance in %substr
%substr contained a token skip to "skip expanded ID", which is
incorrect, as that has already been skipped at that point. It worked
anyway, accidentally, as this token would always be a whitespace token
-- but we then do skip_white() immediately thereafter.
Delete this to allow this code to be factored.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
asm/preproc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/asm/preproc.c b/asm/preproc.c
index ea18c270..f0c7103c 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -4780,10 +4780,7 @@ issue_error:
tline = expand_smacro(tline->next);
last->next = NULL;
- if (tline) /* skip expanded id */
- t = tline->next;
-
- t = skip_white(t);
+ t = skip_white(tline);
/* t should now point to the string */
if (!tok_is(t, TOKEN_STR)) {
More information about the Nasm-commits
mailing list