summaryrefslogtreecommitdiffstats
path: root/mdoc_action.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-05 09:03:12 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-05 09:03:12 +0000
commit8fe89d6752d9bb94a880ba75a5c886bba93a8026 (patch)
tree1af4dbb047eeea574c12c4bfdf68cbe08210a939 /mdoc_action.c
parent1edec9cc4a5ff272a74ba07eaa7331ac21e3b3bb (diff)
downloadmandoc-8fe89d6752d9bb94a880ba75a5c886bba93a8026.tar.gz
Fix issue of non-NAME sections triggering "no sections" error, reported by Christian Weisgerber, patched by Ingo Schwarze.
Diffstat (limited to 'mdoc_action.c')
-rw-r--r--mdoc_action.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index c6cce90e..3e924dbf 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -420,7 +420,11 @@ post_sh(POST_ARGS)
if ( ! concat(m, buf, n->child, BUFSIZ))
return(0);
sec = mdoc_atosec(buf);
- if (SEC_CUSTOM != sec)
+ /*
+ * The first section should always make us move into a non-new
+ * state.
+ */
+ if (SEC_NONE == m->lastnamed || SEC_CUSTOM != sec)
m->lastnamed = sec;
/* Some sections only live in certain manual sections. */