NUL character is usually used as padding (basically  for timming purpouses),
and it should be ignorted. Some old telnet servers send it together each
character. It is also used in some terminfo entries (for example in xterm
terminfo entry).
---
 st.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/st.c b/st.c
index 0db81f4..26237de 100644
--- a/st.c
+++ b/st.c
@@ -1714,6 +1714,8 @@ tputc(char *c) {
                if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey))
                        sel.bx = -1;
                switch(ascii) {
+               case '\0': /* padding character, do nothing */
+                       break;
                case '\t':
                        tputtab(1);
                        break;
--
1.7.10.4

Reply via email to