Преглед на файлове

parse v3 or future-unknown zoneinfo file versions as v2+

the v1 zoneinfo format with 32-bit time is deprecated. previously, the
v2 parsing code was only used if an exact match for '2' was found in
the version field of the header. this was already incorrect for v3
files (trivial differences from v2 that arguably didn't merit a new
version number anyway) but also failed to be future-proof.
Rich Felker преди 4 години
родител
ревизия
c17cda6d61
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/time/__tz.c

+ 1 - 1
src/time/__tz.c

@@ -185,7 +185,7 @@ static void do_tzset()
 	zi = map;
 	if (map) {
 		int scale = 2;
-		if (map[4]=='2') {
+		if (map[4]!='1') {
 			size_t skip = zi_dotprod(zi+20, VEC(1,1,8,5,6,1), 6);
 			trans = zi+skip+44+44;
 			scale++;