Stratosphere: use isxdigit to check if char is hex.

This commit is contained in:
Michael Scire committed 2018-07-29 17:27:30 -07:00
1 parent c70420d996
commit cb4089e49c
3 files changed
+13 -18

No files matched your search

+5 -7
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;
}