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.
This commit is contained in:
Calvin Rose 2020-09-06 10:47:05 -05:00
parent 1eb00a9f74
commit e8734c77b4
1 changed files with 1 additions and 0 deletions

View File

@ -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 */