diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-12 13:00:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-12 13:00:52 +0000 |
commit | 28f08383fa467917c2164add96838d7d1571e7fe (patch) | |
tree | 3e44aec9101157976274d406397a16365d3eece1 /mdoc.c | |
parent | 33da493a191d7c9f4dd1e96d178eeb11d1218abc (diff) | |
download | mandoc-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |