diff options
Diffstat (limited to 'src/strptime.cc')
-rw-r--r-- | src/strptime.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/strptime.cc b/src/strptime.cc index d390d1fa..77593665 100644 --- a/src/strptime.cc +++ b/src/strptime.cc @@ -62,7 +62,9 @@ static const char* kMonthAbbr[] = { static const char* _parse_num(const char* s, int low, int high, int* value) { const char* p = s; - for (*value = 0; *p != NULL && isdigit(*p); ++p) { + for (*value = 0; + *p != NULL && isdigit(static_cast<unsigned char>(*p)); + ++p) { *value = (*value) * 10 + static_cast<int>(*p) - static_cast<int>('0'); } @@ -177,7 +179,7 @@ static char* _strptime(const char *s, const char *format, struct tm *tm) { // arbitrary whitespace. case 't': case 'n': - while (isspace(*s)) ++s; + while (isspace(static_cast<unsigned char>(*s))) ++s; break; // '%'. |