summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-09-12 02:00:05 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-09-12 02:07:06 +0400
commit5ace91d6819bd8341699c1e24dddfbbf1e58c38a (patch)
tree1e6bef89fbd1aa3076d8d8017e5e3abc1172a287
parent9bcdd21efd18c89deb4536e402927a01a7ed49b0 (diff)
downloadnasm-5ace91d6819bd8341699c1e24dddfbbf1e58c38a.tar.gz
BR3064459: Missing %endif doesn't always cause error
error() routine is conditional dependent so we should use nasm_error instead to yield message unconditionally. Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--preproc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/preproc.c b/preproc.c
index 70e550d0..593c9326 100644
--- a/preproc.c
+++ b/preproc.c
@@ -4925,9 +4925,11 @@ static char *pp_getline(void)
{
Include *i = istk;
fclose(i->fp);
- if (i->conds)
- error(ERR_FATAL,
- "expected `%%endif' before end of file");
+ if (i->conds) {
+ /* nasm_error can't be conditionally suppressed */
+ nasm_error(ERR_FATAL,
+ "expected `%%endif' before end of file");
+ }
/* only set line and file name if there's a next node */
if (i->next) {
src_set_linnum(i->lineno);