mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Stricter checking %A vs %a
This commit is contained in:
parent
1d6c99412b
commit
7ecd80de13
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53942
@ -281,17 +281,19 @@ _strptime(const char *buf, const char *fmt, struct tm *tm)
|
||||
case 'A':
|
||||
case 'a':
|
||||
for (i = 0; i < asizeof(Locale->weekday); i++) {
|
||||
len = strlen(Locale->weekday[i]);
|
||||
if (strncasecmp(buf,
|
||||
Locale->weekday[i],
|
||||
len) == 0)
|
||||
break;
|
||||
|
||||
len = strlen(Locale->wday[i]);
|
||||
if (strncasecmp(buf,
|
||||
Locale->wday[i],
|
||||
len) == 0)
|
||||
break;
|
||||
if (c == 'A') {
|
||||
len = strlen(Locale->weekday[i]);
|
||||
if (strncasecmp(buf,
|
||||
Locale->weekday[i],
|
||||
len) == 0)
|
||||
break;
|
||||
} else {
|
||||
len = strlen(Locale->wday[i]);
|
||||
if (strncasecmp(buf,
|
||||
Locale->wday[i],
|
||||
len) == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == asizeof(Locale->weekday))
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user