mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-08 08:58:00 +00:00
Remove assertion that len != 0 in ldisc_send.
A user reported another situation in which that assertion can fail: if you paste text into the terminal that consists 100% of characters not available in the CONF_line_codepage character set, then the translation step generates the empty string as output, and that gets passed to ldisc_send by term_paste without checking. Previous bugs of this kind (see commits4634cd47f7
and43a63019f5
) were fixed by adding a check before calling ldisc_send. But in commit4634cd47f7
I said that probably at some point the right fix would be to remove the assertion in ldisc_send itself, so that passing len==0 becomes legal. (The assertion was there in the first place to catch cases where len==0 was used with its obsolete special meaning of signalling 'please update your status'.) Well, I think it's finally time. The assertion is removed: it's now legal again to call ldisc_send with an empty buffer, and its meaning is no longer the archaic special thing, but the trivial one of sending zero characters through the line discipline. (cherry picked from commitcd3e917fd0
)
This commit is contained in:
parent
d527b1a886
commit
6aa1dcb1ca