Don't accept some invalid preprocessor code
Whitespace or non-numeric characters are required after a preprocessor directive that requires an expression.
This commit is contained in:
parent
532999f4f2
commit
72964a1faf
4 changed files with 48 additions and 1 deletions
|
|
@ -1454,7 +1454,7 @@ String *Preprocessor_parse(String *s) {
|
|||
break;
|
||||
|
||||
case 41: /* Build up the name of the preprocessor directive */
|
||||
if ((isspace(c) || (!isalpha(c)))) {
|
||||
if ((isspace(c) || (!isidchar(c)))) {
|
||||
Clear(value);
|
||||
Clear(comment);
|
||||
if (c == '\n') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue