summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-12 13:00:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-12 13:00:52 +0000
commit28f08383fa467917c2164add96838d7d1571e7fe (patch)
tree3e44aec9101157976274d406397a16365d3eece1 /mdoc.c
parent33da493a191d7c9f4dd1e96d178eeb11d1218abc (diff)
downloadmandoc-28f08383fa467917c2164add96838d7d1571e7fe.tar.gz
Do not confuse .Bl -column lists that just broken another block
with newly opened .Bl -column lists; fixing an assertion failure jsg@ found with afl: test case #481, Bl It Bl -column It Bd El text text El
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdoc.c b/mdoc.c
index eb74df69..f2f37efa 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -601,8 +601,8 @@ mdoc_ptext(struct mdoc *mdoc, int line, char *buf, int offs)
* process within its context in the normal way).
*/
- if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
- LIST_column == n->norm->Bl.type) {
+ if (n->tok == MDOC_Bl && n->type == MDOC_BODY &&
+ n->end == ENDBODY_NOT && n->norm->Bl.type == LIST_column) {
/* `Bl' is open without any children. */
mdoc->flags |= MDOC_FREECOL;
mdoc_macro(mdoc, MDOC_It, line, offs, &offs, buf);
@@ -778,8 +778,8 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs)
* context around the parsed macro.
*/
- if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
- LIST_column == n->norm->Bl.type) {
+ if (n->tok == MDOC_Bl && n->type == MDOC_BODY &&
+ n->end == ENDBODY_NOT && n->norm->Bl.type == LIST_column) {
mdoc->flags |= MDOC_FREECOL;
mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf);
return(1);