From abd8daafc38a9d67119584ccec2ec1f25b950523 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Fri, 3 Nov 2017 13:41:38 +0100 Subject: [PATCH] escape all non-ascii chars to avoid problems with UTF terminals --- src/StreamBuffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StreamBuffer.cc b/src/StreamBuffer.cc index 3b34de3..3bf75fa 100644 --- a/src/StreamBuffer.cc +++ b/src/StreamBuffer.cc @@ -296,7 +296,7 @@ StreamBuffer StreamBuffer::expand(ssize_t start, ssize_t length) const for (i = start; i < end; i++) { c = buffer[i]; - if ((c & 0x7f) < 0x20 || (c & 0x7f) == 0x7f) + if (c < 0x20 || c >= 0x7f) { result.print("<%02x>", c & 0xff); }