fix: off-by-one in isCntrl

0x1F (`control_code.us`) itself is also a control code.
This commit is contained in:
r00ster91 2022-08-14 21:05:37 +02:00
parent aa0b93e875
commit 93ca0c4a5e

View File

@ -232,7 +232,7 @@ pub fn isAlpha(c: u8) bool {
}
pub fn isCntrl(c: u8) bool {
return c < 0x20 or c == 127; //DEL
return c <= control_code.us or c == control_code.del;
}
pub fn isDigit(c: u8) bool {