From: Julien Ramseier Date: Tue, 21 Mar 2017 16:30:45 +0000 (-0400) Subject: fix processing of strptime %p format X-Git-Tag: v1.1.17~80 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=834ef7aff5695e79b1feeacfdc15eaba6a42cab9;p=oweals%2Fmusl.git fix processing of strptime %p format string pointer was not advanced after matching. --- diff --git a/src/time/strptime.c b/src/time/strptime.c index da9e1f42..cff0a7c1 100644 --- a/src/time/strptime.c +++ b/src/time/strptime.c @@ -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;