diff options
author | 2014-08-16 19:47:17 +0000 | |
---|---|---|
committer | 2014-08-16 19:47:17 +0000 | |
commit | 02c9cc101636db804342fba6a74b079abe7dd482 (patch) | |
tree | bba3f614857cd80ec25807339eec42d68734f367 /usr.bin/mandoc/mdoc_macro.c | |
parent | replace sprintf/strdup with asprintf in engine test (diff) | |
download | wireguard-openbsd-02c9cc101636db804342fba6a74b079abe7dd482.tar.xz wireguard-openbsd-02c9cc101636db804342fba6a74b079abe7dd482.zip |
If a stray .It follows .El, we are no longer in the list,
even though the list is still the last processed macro.
This fixes a regression introduced in mdoc_macro.c rev. 1.95:
Ulrich Spoerlein <uqs at FreeBSD> reports that various of their
kernel manuals trigger assertions.
Diffstat (limited to 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 91448ad820f..8f051811eab 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.96 2014/08/08 15:54:10 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.97 2014/08/16 19:47:17 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -1037,7 +1037,8 @@ blk_full(MACRO_PROT_ARGS) if (tok == MDOC_It) { for (n = mdoc->last; n; n = n->parent) - if (n->tok == MDOC_Bl) + if (n->tok == MDOC_Bl && + ! (n->flags & MDOC_VALID)) break; if (n == NULL) { mandoc_vmsg(MANDOCERR_IT_STRAY, mdoc->parse, |