Skip to content

Commit 913901e

Browse files
author
H. Peter Anvin
committed
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 <[email protected]>
1 parent 57fbd34 commit 913901e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

asm/preproc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4780,10 +4780,7 @@ static int do_directive(Token *tline, Token **output)
47804780
tline = expand_smacro(tline->next);
47814781
last->next = NULL;
47824782

4783-
if (tline) /* skip expanded id */
4784-
t = tline->next;
4785-
4786-
t = skip_white(t);
4783+
t = skip_white(tline);
47874784

47884785
/* t should now point to the string */
47894786
if (!tok_is(t, TOKEN_STR)) {

0 commit comments

Comments
 (0)