diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-04-05 09:03:12 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-04-05 09:03:12 +0000 |
commit | ad49fd6fca6bf93db3c355e5d5c4c18d84405a08 (patch) | |
tree | eb60ee5df62fdf797ca7b434eb72aff67a64b916 | |
parent | 2b3f4260250d09aee45d955266bc57b3e5efe335 (diff) | |
download | mandoc-ad49fd6fca6bf93db3c355e5d5c4c18d84405a08.tar.gz mandoc-ad49fd6fca6bf93db3c355e5d5c4c18d84405a08.tar.zst mandoc-ad49fd6fca6bf93db3c355e5d5c4c18d84405a08.zip |
Fix issue of non-NAME sections triggering "no sections" error, reported by Christian Weisgerber, patched by Ingo Schwarze.
-rw-r--r-- | mdoc_action.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index 10888a1d..dcf3d32d 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.51 2010/03/31 07:13:53 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.52 2010/04/05 09:03:12 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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. */ |