summaryrefslogtreecommitdiffstats
path: root/tbl_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'tbl_term.c')
-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;
}