From 1fbcae9f084d687e46140f0d74377f522c899f5e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 28 Nov 2018 13:43:54 +0000 Subject: additional check needed after the previous (box drawing) patch --- tbl_term.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tbl_term.c') 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 * Copyright (c) 2011-2018 Ingo Schwarze @@ -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; } -- cgit v1.2.3