From 72026b443d930ccb7797372f41f0e051469b856b Mon Sep 17 00:00:00 2001 From: xavi Date: Mon, 14 Oct 2024 11:08:55 -0700 Subject: [PATCH] Fixed bug to include 0 and 9 and 48 and 57 in x_is_digit --- x_ctypes/src/x_ctypes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x_ctypes/src/x_ctypes.c b/x_ctypes/src/x_ctypes.c index f1d1cd7..dbf30a2 100644 --- a/x_ctypes/src/x_ctypes.c +++ b/x_ctypes/src/x_ctypes.c @@ -1,10 +1,10 @@ #include 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; }