From e8734c77b462ec7d4470f0be22a4d6cc6414fc73 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 6 Sep 2020 10:47:05 -0500 Subject: [PATCH] Fix bug by casting to unsigned char. Higher unciode codepoints where being read as negative char values. We need to cast to unsigned char before comparing to 0x20 to check for unprintable characters. --- src/mainclient/shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mainclient/shell.c b/src/mainclient/shell.c index 4a24f9ee..80d643ed 100644 --- a/src/mainclient/shell.c +++ b/src/mainclient/shell.c @@ -763,6 +763,7 @@ static int line() { switch (c) { default: + if ((unsigned char) c < 0x20) break; if (insert(c, 1)) return -1; break; case 1: /* ctrl-a */