diff options
-rw-r--r-- | src/common/text.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/text.c b/src/common/text.c index cac76054..b6343f27 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -298,6 +298,10 @@ scrollback_load (session *sess) { char *buf_tmp; + /* If nothing but funny trailing matter e.g. 0x0d or 0x0d0a, toss it */ + if (n_bytes >= 1 && buf[0] == 0x0d) + continue; + n_bytes--; buf_tmp = buf; buf = g_strndup (buf_tmp, n_bytes); |