diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-09-12 02:00:05 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-09-15 21:12:37 +0400 |
commit | 530c1eddf53d19e30025c11b2c4598248cd1c9c5 (patch) | |
tree | 341937cbc509172685bedd096cb8fbac7540eb30 | |
parent | ccba110e69b767d6bc88c7ad4176d8d0d2f0046b (diff) | |
download | nasm-530c1eddf53d19e30025c11b2c4598248cd1c9c5.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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |