At the end of every tbl(7) cell, clear the \z state.
authorschwarze <schwarze@openbsd.org>
Tue, 26 Apr 2022 14:46:30 +0000 (14:46 +0000)
committerschwarze <schwarze@openbsd.org>
Tue, 26 Apr 2022 14:46:30 +0000 (14:46 +0000)
commit2a491d59dd34aaed2895e0fae6ed5680bace60f5
treed76e99524bcfba11b8bd9ae74fa8cca0118847e5
parent7fbd65bb7b0a99c63cb70db3c228f22a76ec5066
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).
regress/usr.bin/mandoc/tbl/data/Makefile
regress/usr.bin/mandoc/tbl/data/escz.in [new file with mode: 0644]
regress/usr.bin/mandoc/tbl/data/escz.out_ascii [new file with mode: 0644]
regress/usr.bin/mandoc/tbl/data/escz_end.in [new file with mode: 0644]
regress/usr.bin/mandoc/tbl/data/escz_end.out_ascii [new file with mode: 0644]
usr.bin/mandoc/tbl_term.c