From 530c1eddf53d19e30025c11b2c4598248cd1c9c5 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 12 Sep 2010 02:00:05 +0400 Subject: 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 --- preproc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/preproc.c b/preproc.c index f7f0114a..9a8085d8 100644 --- a/preproc.c +++ b/preproc.c @@ -4948,9 +4948,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); -- cgit v1.2.1