BR 3392669: in expand_one_smacro(), we may reach EOL before tafter

If the rest of the line is consumed, we may never see tafter, so we
have to test for end of line at line 5412.  We already do at 5397, so
it clearly should have been there all along.

Reported-by: <puppet@zju.edu.cn>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2020-06-01 12:21:10 -07:00
parent 7cfd01868c
commit 6e71496e3c
2 changed files with 1 additions and 1 deletions

View File

@ -5409,7 +5409,7 @@ static SMacro *expand_one_smacro(Token ***tpp)
}
**tpp = tline;
for (t = tline; t != tafter; t = t->next)
for (t = tline; t && t != tafter; t = t->next)
*tpp = &t->next;
m->in_progress = false;

BIN
test/br3392669-57.asm Normal file

Binary file not shown.