mirror of
git://git.musl-libc.org/musl
synced 2024-12-20 05:41:00 +00:00
fix processing of strptime %p format
string pointer was not advanced after matching.
This commit is contained in:
parent
85dfab7eaf
commit
834ef7aff5
@ -94,6 +94,7 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri
|
||||
len = strlen(ex);
|
||||
if (!strncasecmp(s, ex, len)) {
|
||||
tm->tm_hour %= 12;
|
||||
s += len;
|
||||
break;
|
||||
}
|
||||
ex = nl_langinfo(PM_STR);
|
||||
@ -101,6 +102,7 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri
|
||||
if (!strncasecmp(s, ex, len)) {
|
||||
tm->tm_hour %= 12;
|
||||
tm->tm_hour += 12;
|
||||
s += len;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user