mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 06:49:23 +00:00
fix: off-by-one in isCntrl
0x1F (`control_code.us`) itself is also a control code.
This commit is contained in:
parent
aa0b93e875
commit
93ca0c4a5e
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user