aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tbl_term.c
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
commit1fbcae9f084d687e46140f0d74377f522c899f5e (patch)
treedd8a66534f982a0ba3c5a6132fab7a7ffd389ab2 /tbl_term.c
parent776d5a435372c7c783c0e792c4508fbc450b465f (diff)
downloadmandoc-1fbcae9f084d687e46140f0d74377f522c899f5e.tar.gz
mandoc-1fbcae9f084d687e46140f0d74377f522c899f5e.tar.zst
mandoc-1fbcae9f084d687e46140f0d74377f522c899f5e.zip
additional check needed after the previous (box drawing) patch
Diffstat (limited to 'tbl_term.c')
-rw-r--r--tbl_term.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tbl_term.c b/tbl_term.c
index c02bd275..1cc47a89 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_term.c,v 1.62 2018/11/28 04:47:51 schwarze Exp $ */
+/* $Id: tbl_term.c,v 1.63 2018/11/28 13:43:54 schwarze Exp $ */
/*
* Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}