mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 21:24:11 -04:00
Stratosphere: use isxdigit to check if char is hex.
This commit is contained in:
parent
c70420d996
commit
cb4089e49c
3 changed files with 13 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue