1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix ldisc_send() assertion in terminal answerback.

A user reports that if the ^E answerback string is configured to be
empty, then causing the answerback to be sent fails the assertion in
ldisc_send introduced in commit c269dd013.

I thought I'd caught all of the remaining cases of this in commit
4634cd47f, but apparently not.

(cherry picked from commit 43a63019f5)
This commit is contained in:
Simon Tatham 2020-01-13 19:02:55 +00:00
parent 7ccc368a57
commit e1344d6ca7

View File

@ -3406,7 +3406,8 @@ static void term_out(Terminal *term)
strbuf *buf = term_input_data_from_charset(
term, DEFAULT_CODEPAGE,
term->answerback, term->answerbacklen);
ldisc_send(term->ldisc, buf->s, buf->len, false);
if (buf->len)
ldisc_send(term->ldisc, buf->s, buf->len, false);
strbuf_free(buf);
}
break;