mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix bugs in strptime handling of string day/month names, literals
This commit is contained in:
parent
ca19774c91
commit
536db2b5ac
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@ char *strptime(const char *s, const char *f, struct tm *tm)
|
|||
else if (*s != *f) return 0;
|
||||
else s++;
|
||||
f++;
|
||||
continue;
|
||||
}
|
||||
f++;
|
||||
if (*f == '+') f++;
|
||||
|
@ -165,6 +166,7 @@ char *strptime(const char *s, const char *f, struct tm *tm)
|
|||
ex = nl_langinfo(min+i);
|
||||
len = strlen(ex);
|
||||
if (strncasecmp(s, ex, len)) continue;
|
||||
s += len;
|
||||
*dest = i % range;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue