Przeglądaj źródła

Fix android apk contents having mtime 1 month in future

minizip documentation describes tm_mon as expecting the number of months
since January - [0, 11], but the month returned by OS.get_date() is in
the range of [1, 12].
Mark Riedesel 4 lat temu
rodzic
commit
5fe902244a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      platform/android/export/export.cpp

+ 1 - 1
platform/android/export/export.cpp

@@ -592,7 +592,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
 		zipfi.tmz_date.tm_hour = time.hour;
 		zipfi.tmz_date.tm_mday = date.day;
 		zipfi.tmz_date.tm_min = time.min;
-		zipfi.tmz_date.tm_mon = date.month;
+		zipfi.tmz_date.tm_mon = date.month - 1; // tm_mon is zero indexed
 		zipfi.tmz_date.tm_sec = time.sec;
 		zipfi.tmz_date.tm_year = date.year;
 		zipfi.dosDate = 0;