summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-11-28 13:43:27 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-11-28 13:43:27 +0000
commit62e3812a422740fcbdc66f1b8c29170c8646f654 (patch)
treeeffafb606ec9fc462d568b6020d48964dbed6f27
parent3f2ca989ff504a7064722af3de3ed9607462e0a9 (diff)
additional check needed after the previous (box drawing) patch
-rw-r--r--usr.bin/mandoc/tbl_term.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/mandoc/tbl_term.c b/usr.bin/mandoc/tbl_term.c
index 0f96f8b4533..cd0cd60a835 100644
--- a/usr.bin/mandoc/tbl_term.c
+++ b/usr.bin/mandoc/tbl_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tbl_term.c,v 1.50 2018/11/28 04:47:46 schwarze Exp $ */
+/* $OpenBSD: tbl_term.c,v 1.51 2018/11/28 13:43:26 schwarze Exp $ */
/*
* Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -435,11 +435,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;
}