diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/tbl_term.c | 13 |
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; } |