Stratosphere: use isxdigit to check if char is hex.
This commit is contained in:
1 parent
c70420d996
commit
cb4089e49c
3 files changed
+13
-18
No files matched your search
@@ -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