aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-19 22:14:30 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-19 22:14:30 -0700
commite126581f4d391cc25cf3db55acff717aee39c85c (patch)
tree45455f4c68a7c2f56e3a066cd9cdbb5bc3ef9c5f
parentec03301eb4e6137bd58fb56defc7346bdfec6991 (diff)
downloadnasm-e126581f4d391cc25cf3db55acff717aee39c85c.tar.gz
nasm-e126581f4d391cc25cf3db55acff717aee39c85c.tar.xz
nasm-e126581f4d391cc25cf3db55acff717aee39c85c.zip
preproc: error on unterminated %[...]
Make unterminated %[...] constructs an error. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--preproc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/preproc.c b/preproc.c
index 0b7ec1c8..253244ca 100644
--- a/preproc.c
+++ b/preproc.c
@@ -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; /* %? */