old-st

[ARCHIVED] my build of st
git clone git://git.ckyln.com/~cem/old-st.git
Log | Files | Refs | README | LICENSE

commit dd0b57fc0a7d52d8055d950d1a1e923778068f06
parent bce7d62dc138f96efa129be5909b8b580b0d2f3a
Author: Avi Halachmi (:avih) <avihpit@yahoo.com>
Date:   Wed, 16 Oct 2019 12:19:49 +0300

STREscape: don't trim prematurely

STRescape holds strings in escape sequences such as OSC and DCS, and
its buffer is 512 bytes.

If the input is too big then trailing chars are ignored, but the test
was off-by-1 such that it took 510 chars instead of 511 (before a
terminating NULL is added).

Now the full size can be utilized.

Diffstat:
Mst.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/st.c b/st.c @@ -2441,7 +2441,7 @@ tputc(Rune u) if (term.esc&ESC_DCS && strescseq.len == 0 && u == 'q') term.mode |= MODE_SIXEL; - if (strescseq.len+len >= sizeof(strescseq.buf)-1) { + if (strescseq.len+len >= sizeof(strescseq.buf)) { /* * Here is a bug in terminals. If the user never sends * some code to stop the str or esc command, then st