fix end-of-buffer error in tccpp.c
Quick fix for http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00160.html. I don't fully understand the intended semantics of when file->buf_ptr[0] is valid, but the rest of the code doesn't have any obvious spots with the same bug. Feel free to revert this if I'm mistaken or we need to discuss this change further.
This commit is contained in:
parent
4126056fbe
commit
2e04fa8872
1 changed files with 1 additions and 1 deletions
2
tccpp.c
2
tccpp.c
|
@ -2888,7 +2888,7 @@ static int macro_subst_tok(TokenString *tok_str,
|
|||
goto redo;
|
||||
}
|
||||
} else {
|
||||
ch = file->buf_ptr[0];
|
||||
ch = tcc_peekc_slow(file);
|
||||
while (is_space(ch) || ch == '\n' || ch == '/')
|
||||
{
|
||||
if (ch == '/')
|
||||
|
|
Loading…
Reference in a new issue