diff options
author | Julien Ramseier <j.ramseier@gmail.com> | 2017-03-21 12:30:45 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-03-21 12:30:45 -0400 |
commit | 834ef7aff5695e79b1feeacfdc15eaba6a42cab9 (patch) | |
tree | 66d1b64ab9b51447775bffd829ff017207907a53 | |
parent | 85dfab7eaf1624577ec6de8375fd771ef9b4672a (diff) | |
download | musl-834ef7aff5695e79b1feeacfdc15eaba6a42cab9.tar.gz musl-834ef7aff5695e79b1feeacfdc15eaba6a42cab9.tar.bz2 musl-834ef7aff5695e79b1feeacfdc15eaba6a42cab9.tar.xz musl-834ef7aff5695e79b1feeacfdc15eaba6a42cab9.zip |
fix processing of strptime %p format
string pointer was not advanced after matching.
-rw-r--r-- | src/time/strptime.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |