mirror of
https://github.com/fluencelabs/musl
synced 2025-06-29 06:32:16 +00:00
fix bugs in strptime handling of string day/month names, literals
This commit is contained in:
@ -18,6 +18,7 @@ char *strptime(const char *s, const char *f, struct tm *tm)
|
|||||||
else if (*s != *f) return 0;
|
else if (*s != *f) return 0;
|
||||||
else s++;
|
else s++;
|
||||||
f++;
|
f++;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
f++;
|
f++;
|
||||||
if (*f == '+') f++;
|
if (*f == '+') f++;
|
||||||
@ -165,6 +166,7 @@ char *strptime(const char *s, const char *f, struct tm *tm)
|
|||||||
ex = nl_langinfo(min+i);
|
ex = nl_langinfo(min+i);
|
||||||
len = strlen(ex);
|
len = strlen(ex);
|
||||||
if (strncasecmp(s, ex, len)) continue;
|
if (strncasecmp(s, ex, len)) continue;
|
||||||
|
s += len;
|
||||||
*dest = i % range;
|
*dest = i % range;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user