summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-03 13:54:02 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-03 13:54:02 +0000
commitede40bc58ccbd25835890732101c1c20b7afdb60 (patch)
treefa270d9ad888c2aa389ccd5146a98d1001c269d5 /main.c
parent5be7a4ded8b88fd7df89348083d8e985282780fc (diff)
downloadmandoc-ede40bc58ccbd25835890732101c1c20b7afdb60.tar.gz
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).
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index 16e8899e..104e1346 100644
--- a/main.c
+++ b/main.c
@@ -805,6 +805,14 @@ rerun:
}
/*
+ * 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
* locally per parse routine since we can use different