From 063741173fb7a72af87af9a708cc91a48d8c81b8 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 3 Jan 2011 13:54:02 +0000 Subject: Make sure we don't continue recursively parsing once we've exited with failure (this had caused some segfaults with the new assert() call in MAN_HALT and MDOC_HALT). --- main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 5b9fe27f..9368f37c 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.131 2011/01/01 22:27:08 kristaps Exp $ */ +/* $Id: main.c,v 1.132 2011/01/03 13:54:02 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -804,6 +804,14 @@ rerun: break; } + /* + * If we encounter errors in the recursive parsebuf() + * call, make sure we don't continue parsing. + */ + + if (MANDOCLEVEL_FATAL <= file_status) + break; + /* * If input parsers have not been allocated, do so now. * We keep these instanced betwen parsers, but set them -- cgit v1.2.3-56-ge451