diff --git a/lib/roken/strptime.c b/lib/roken/strptime.c index 1af4cb84a..8916fce5e 100644 --- a/lib/roken/strptime.c +++ b/lib/roken/strptime.c @@ -213,8 +213,8 @@ strptime (const char *buf, const char *format, struct tm *timeptr) char *s; int ret; - if (isspace (c)) { - while (isspace (*buf)) + if (isspace ((unsigned char)c)) { + while (isspace ((unsigned char)*buf)) ++buf; } else if (c == '%' && format[1] != '\0') { c = *++format;