summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-11-28 13:43:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-11-28 13:43:54 +0000
commit005d9debfac968da4a1e3d86e3e4f65ec7890c08 (patch)
treeb0045388629cd4d3fb98d2028ddec017e7cbc348
parent4c42f89a98e8a9375432b7ad280a9defc5ba83ec (diff)
downloadmandoc-005d9debfac968da4a1e3d86e3e4f65ec7890c08.tar.gz
additional check needed after the previous (box drawing) patch
-rw-r--r--tbl_term.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tbl_term.c b/tbl_term.c
index f7be0d1d..2a426c3d 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -437,11 +437,14 @@ term_tbl(struct termp *tp, const struct tbl_span *sp)
* but not after the last column.
*/
- if (fc == 0 && ((uvert == 0 && dvert == 0 &&
- (cp->next == NULL ||
+ if (fc == 0 &&
+ ((uvert == 0 && dvert == 0 &&
+ cp != NULL && (cp->next == NULL ||
!IS_HORIZ(cp->next))) ||
- tp->tcol + 1 == tp->tcols + tp->lasttcol)) {
- cp = cp->next;
+ tp->tcol + 1 ==
+ tp->tcols + tp->lasttcol)) {
+ if (cp != NULL)
+ cp = cp->next;
continue;
}