From c1cd8ca4c718f4917e14241a7666a071d266192d Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 26 Apr 2022 14:52:05 +0000 Subject: At the end of every tbl(7) cell, clear the \z state. This is needed because the TERMP_MULTICOL mode is designed such that term_tbl() buffers all the cells of the table row before the normal reset logic near the end of term_flushln() can be reached. This fixes an assertion failure triggered by \z near the end of a table cell, found by tb@ using afl(1). --- tbl_term.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tbl_term.c') diff --git a/tbl_term.c b/tbl_term.c index e424e027..9e8f9e38 100644 --- a/tbl_term.c +++ b/tbl_term.c @@ -1,6 +1,6 @@ /* $Id$ */ /* - * Copyright (c) 2011-2021 Ingo Schwarze + * Copyright (c) 2011-2022 Ingo Schwarze * Copyright (c) 2009, 2011 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any @@ -293,6 +293,7 @@ term_tbl(struct termp *tp, const struct tbl_span *sp) } tp->tcol++; tp->col = 0; + tp->flags &= ~(TERMP_BACKAFTER | TERMP_BACKBEFORE); tbl_data(tp, sp->opts, cp, dp, tp->tbl.cols + ic); if (dp != NULL && (ic || sp->layout->first->pos != TBL_CELL_SPAN)) { -- cgit