1
0
Эх сурвалжийг харах

fix bugs in strptime handling of string day/month names, literals

Rich Felker 13 жил өмнө
parent
commit
536db2b5ac
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      src/time/strptime.c

+ 2 - 0
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;
 			}