diff --git a/tty-term.c b/tty-term.c index 3ccff2ff..5aac1e0c 100644 --- a/tty-term.c +++ b/tty-term.c @@ -302,6 +302,8 @@ tty_term_strip(const char *s) ptr++; if (*ptr == '>') ptr++; + if (*ptr == '\0') + break; } buf[len++] = *ptr;