From 28f08383fa467917c2164add96838d7d1571e7fe Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 12 Feb 2015 13:00:52 +0000 Subject: 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 --- mdoc.c | 8 ++++---- 1 file 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); -- cgit