Stratosphere: use isxdigit to check if char is hex.

This commit is contained in:
Michael Scire 2018-07-29 17:27:30 -07:00
parent c70420d996
commit cb4089e49c
3 changed files with 13 additions and 18 deletions

View file

@ -12,13 +12,11 @@
static bool IsHexadecimal(const char *str) {
while (*str) {
if (('0' <= *str && *str <= '9') ||
('a' <= *str && *str <= 'f') ||
('A' <= *str && *str <= 'F')) {
str++;
} else {
return false;
}
if (isxdigit(*str)) {
str++;
} else {
return false;
}
}
return true;
}