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:
William S Fulton 2018-01-15 19:57:10 +00:00
commit 72964a1faf
4 changed files with 48 additions and 1 deletions

View file

@ -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') {