diff options
author | 2018-11-28 13:43:26 +0000 | |
---|---|---|
committer | 2018-11-28 13:43:26 +0000 | |
commit | 5191762fe52ba323194f6149e5f71869b92c2e34 (patch) | |
tree | b3936e1739e6f456bce73c5a70989836f7f98d65 | |
parent | This test does not terminate if malloc conf is preconfigured with (diff) | |
download | wireguard-openbsd-5191762fe52ba323194f6149e5f71869b92c2e34.tar.xz wireguard-openbsd-5191762fe52ba323194f6149e5f71869b92c2e34.zip |
additional check needed after the previous (box drawing) patch
-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; } |