summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-15 22:27:24 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-15 22:27:24 +0000
commit4dddabf4312993bde7bd2108077c8ecbaf0542a5 (patch)
tree22d0100f5e3decae8f25543459604f5fe85fb22b /mdoc_macro.c
parentcb192ac4eef122c00382d72fb72b907fd07e3516 (diff)
downloadmandoc-4dddabf4312993bde7bd2108077c8ecbaf0542a5.tar.gz
When blk_full() handles an .It line in .Bl -column and indirectly
calls phrase_ta() to handle a .Ta child macro, advance the body pointer accordingly, such that a subsequent tab character rewinds the right body block and doesn't fail an assertion. That happened when there was nothing between the .Ta and the tab character. Bug reported by tim@ some time ago.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 4fcfdc64..b235c569 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1108,6 +1108,11 @@ blk_full(MACRO_PROT_ARGS)
mdoc->flags |= MDOC_PPHRASE;
parse_rest(mdoc, TOKEN_NONE, line, &la, buf);
mdoc->flags &= ~MDOC_PPHRASE;
+
+ /* There may have been `Ta' macros. */
+
+ while (body->next != NULL)
+ body = body->next;
continue;
}