diff --git a/pkstrings/src/lib.rs b/pkstrings/src/lib.rs index 06b023c..059694e 100644 --- a/pkstrings/src/lib.rs +++ b/pkstrings/src/lib.rs @@ -57,14 +57,14 @@ const fn strtohex(chr: &char) -> Option { const fn hextostr(hex: u8) -> Option { Some(match hex { - cap @ 0x80..=0x99 => (('A' as u8) + cap - 0x80) as char, + cap @ 0x80..=0x99 => (('A' as u8) + (cap - 0x80)) as char, 0x9a => '(', 0x9b => ')', 0x9c => ':', 0x9d => ';', 0x9e => '[', 0x9f => ']', - low @ 0xa0..=0xb9 => (('a' as u8) + low - 0xa0) as char, + low @ 0xa0..=0xb9 => (('a' as u8) + (low - 0xa0)) as char, 0xe0 => '\'', 0xe3 => '-', 0xe6 => '?', @@ -79,7 +79,7 @@ const fn hextostr(hex: u8) -> Option { 0xf3 => '/', 0xf4 => ',', 0xf5 => '♀', - num @ 0xf6..=0xff => (('0' as u8) + num - 0xf6) as char, + num @ 0xf6..=0xff => (('0' as u8) + (num - 0xf6)) as char, 0x7f => ' ', 0x50 => '@', _ => return None,