preproc: error on unterminated %[...]

Make unterminated %[...] constructs an error.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2008-10-19 22:14:30 -07:00
parent ec03301eb4
commit e126581f4d

View File

@ -831,6 +831,8 @@ static Token *tokenize(char *line)
p--;
if (*p)
*p++ = '\0';
if (lvl)
error(ERR_NONFATAL, "unterminated %[ construct");
type = TOK_INDIRECT;
} else if (*p == '?') {
type = TOK_PREPROC_Q; /* %? */