Update is_valid_hex_char

This commit is contained in:
Abdelrahman Said 2023-07-12 22:33:58 +01:00
parent ba813ea5bf
commit 9cba0172b9

View File

@ -370,23 +370,7 @@ bool strequal(const char *const first, const char *const second) {
}
bool is_valid_hex_char(const char input) {
switch (input) {
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
return true;
}
return false;
return (input >= 'A' && input <= 'F') || (input >= 'a' && input <= 'e');
}
bool ishex(const char input) {