fix bugs in strptime handling of string day/month names, literals
authorRich Felker <dalias@aerifal.cx>
Fri, 2 Mar 2012 05:23:43 +0000 (00:23 -0500)
committerRich Felker <dalias@aerifal.cx>
Fri, 2 Mar 2012 05:23:43 +0000 (00:23 -0500)
src/time/strptime.c

index 488c08dd657aaca737a14659ef045469162085e9..4c0bb26ca4a1409d284458bc6a7358159ff7bf41 100644 (file)
@@ -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;
                        }