authorgravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-08-14 21:05:37+02:00
committergravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-08-14 21:05:37+02:00
log93ca0c4a5e040baacfdda495439c4a21467e0e51
tree965b806127e3ccace9f89cf8e87bf660b7a56c46
parentaa0b93e87579e0a732fc6ef9cfa3d1cc071e8559

fix: off-by-one in `isCntrl`

0x1F (`control_code.us`) itself is also a control code.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/ascii.zig+1-1
...@@ -232,7 +232,7 @@ pub fn isAlpha(c: u8) bool {...@@ -232,7 +232,7 @@ pub fn isAlpha(c: u8) bool {
232}232}
233233
234pub fn isCntrl(c: u8) bool {234pub fn isCntrl(c: u8) bool {
235 return c < 0x20 or c == 127; //DEL235 return c <= control_code.us or c == control_code.del;
236}236}
237237
238pub fn isDigit(c: u8) bool {238pub fn isDigit(c: u8) bool {