Fixed bug to include 0 and 9 and 48 and 57 in x_is_digit

This commit is contained in:
xavi 2024-10-14 11:08:55 -07:00
parent 8ca828ebf6
commit 72026b443d

View File

@ -1,10 +1,10 @@
#include <stdio.h>
int x_isdigit(const char x){
if ( x > 48 && x < 57 ){
if ( x >= 48 && x <= 57 ){
return 1;
}
else if ( x > 0 && x < 9 ){
else if ( x >= 0 && x <= 9 ){
return 1;
}