mirror of
https://github.com/janet-lang/janet
synced 2025-02-04 11:19:10 +00:00
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:
parent
1eb00a9f74
commit
e8734c77b4
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user