From 9a0cb802523549298df7c49dbcd5705fb477113b Mon Sep 17 00:00:00 2001 From: tadf Date: Sat, 3 Mar 2012 03:14:27 +0000 Subject: * 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 --- ext/date/date_strptime.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext/date/date_strptime.c') 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; -- cgit v1.2.3