diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-03 03:14:27 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-03 03:14:27 +0000 |
commit | 9a0cb802523549298df7c49dbcd5705fb477113b (patch) | |
tree | da58ae60cf89cba96174d051a8552843b5323429 /ext/date/date_strptime.c | |
parent | 85e866978fb54cddf2692a9d3e439c709956eb62 (diff) |
* ext/date/date_{parse,strptime}.c [ruby-dev:45303].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_strptime.c')
-rw-r--r-- | ext/date/date_strptime.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c index eaec8e716b..c6a5969172 100644 --- a/ext/date/date_strptime.c +++ b/ext/date/date_strptime.c @@ -58,14 +58,15 @@ static const char *extz_pats[] = { static int num_pattern_p(const char *s) { - if (isdigit(*s)) + if (isdigit((unsigned char)*s)) return 1; if (*s == '%') { s++; if (*s == 'E' || *s == 'O') s++; if (*s && - (strchr("CDdeFGgHIjkLlMmNQRrSsTUuVvWwXxYy", *s) || isdigit(*s))) + (strchr("CDdeFGgHIjkLlMmNQRrSsTUuVvWwXxYy", *s) || + isdigit((unsigned char)*s))) return 1; } return 0; @@ -624,7 +625,7 @@ date__strptime_internal(const char *str, size_t slen, case '\v': case '\f': case '\r': - while (isspace(str[si])) + while (isspace((unsigned char)str[si])) si++; fi++; break; |