diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-15 22:27:24 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-15 22:27:24 +0000 |
commit | 3a00712aa8c23948d8642a9dc110e5107c1a3702 (patch) | |
tree | 567cac10af00fb630bbdac3d3c3d4afe50f3f523 | |
parent | 056d035e4b002d0579215e3bb08737c61502eb25 (diff) | |
download | mandoc-3a00712aa8c23948d8642a9dc110e5107c1a3702.tar.gz mandoc-3a00712aa8c23948d8642a9dc110e5107c1a3702.tar.zst mandoc-3a00712aa8c23948d8642a9dc110e5107c1a3702.zip |
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.
-rw-r--r-- | mdoc_macro.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index a7d6ebd8..bb453b6b 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.203 2015/10/12 00:08:15 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.204 2015/10/15 22:27:24 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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; } |