summaryrefslogtreecommitdiff
path: root/src/vasprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vasprintf.c')
-rw-r--r--src/vasprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vasprintf.c b/src/vasprintf.c
index 6e1846b7..2ee73121 100644
--- a/src/vasprintf.c
+++ b/src/vasprintf.c
@@ -265,7 +265,7 @@ static int getint(const char **string)
{
int i = 0;
- while (isdigit(**string) != 0) {
+ while (isdigit((unsigned char)**string) != 0) {
i = i * 10 + (**string - '0');
(*string)++;
}
@@ -356,7 +356,7 @@ static int dispatch(xprintf_struct *s)
width = va_arg(s->vargs, int);
if ((size_t)width > 0x3fffU) /* 'size_t' to check against negative values too */
width = 0x3fff;
- } else if (isdigit(*SRCTXT)) /* width given as ASCII number */
+ } else if (isdigit((unsigned char)*SRCTXT)) /* width given as ASCII number */
width = getint(&SRCTXT);
else
width = -1; /* no width specified */
@@ -372,7 +372,7 @@ static int dispatch(xprintf_struct *s)
if ((size_t)prec >= 0x3fffU) /* 'size_t' to check against negative values too */
prec = 0x3fff;
} else { /* .prec given as ASCII number */
- if (isdigit(*SRCTXT) == 0)
+ if (isdigit((unsigned char)*SRCTXT) == 0)
INCOHERENT();
prec = getint(&SRCTXT);
}