diff --git a/src/stdlib/strto_int.c b/src/stdlib/strto_int.c index 2da6dc7..7c9da4f 100644 --- a/src/stdlib/strto_int.c +++ b/src/stdlib/strto_int.c @@ -49,7 +49,7 @@ int __strto_int(struct __scanf_input *input, int base, long *outl, int v = -1; int c = __scanf_peek(input); if(isdigit(c)) v = c - '0'; - if(islower(c)) v = c - 'a' + 10; + if(isalpha(c)) v = tolower(c) - 'a' + 10; if(v == -1 || v >= base) break; /* The value is valid as long as there is at least one digit */