[Nasm-commits] [nasm:preproc-rewrite] preproc.c: fixed error handling within PP_ENDIF

nasm-bot for Keith Kanios keith at kanios.net
Thu Jun 4 19:56:32 PDT 2020


Commit-ID:  350f9a1e21d17411587f70de1a6ed9be9f436e82
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=350f9a1e21d17411587f70de1a6ed9be9f436e82
Author:     Keith Kanios <keith at kanios.net>
AuthorDate: Fri, 1 Oct 2010 20:04:18 -0500
Committer:  Keith Kanios <keith at kanios.net>
CommitDate: Fri, 1 Oct 2010 20:04:18 -0500

preproc.c: fixed error handling within PP_ENDIF



---
 preproc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/preproc.c b/preproc.c
index c6ee4bd6..572aaa4e 100644
--- a/preproc.c
+++ b/preproc.c
@@ -2811,6 +2811,7 @@ issue_error:
                           "trailing garbage after `%%endif' ignored");
 		if ((defining == NULL) || (defining->type != EXP_IF)) {
 			error(ERR_NONFATAL, "`%%endif': no matching `%%if'");
+			return DIRECTIVE_FOUND;
 		}
 		ed = defining;
 		defining = ed->prev;


More information about the Nasm-commits mailing list