about summary refs log tree commit diff
path: root/src/time
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-02 00:23:43 -0500
committerRich Felker <dalias@aerifal.cx>2012-03-02 00:23:43 -0500
commit536db2b5ac6b9fee7129417926c59ca12e8dffb0 (patch)
tree10ca6988f4ab62a0b6c5a61fb806a5651d51adf4 /src/time
parentca19774c913739ef2bea9586a847d8719f19840f (diff)
downloadmusl-536db2b5ac6b9fee7129417926c59ca12e8dffb0.tar.gz
musl-536db2b5ac6b9fee7129417926c59ca12e8dffb0.tar.xz
musl-536db2b5ac6b9fee7129417926c59ca12e8dffb0.zip
fix bugs in strptime handling of string day/month names, literals
Diffstat (limited to 'src/time')
-rw-r--r--src/time/strptime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/time/strptime.c b/src/time/strptime.c
index 488c08dd..4c0bb26c 100644
--- a/src/time/strptime.c
+++ b/src/time/strptime.c
@@ -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;
 			}