Stratosphere: use isxdigit to check if char is hex.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user