From 5740bd808abfcb2ce3160a0fc62c47a7e7e0ab8e Mon Sep 17 00:00:00 2001 From: Mark Riedesel Date: Fri, 23 Oct 2020 15:05:48 -0400 Subject: [PATCH] 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]. (cherry picked from commit 5fe902244a192b33ea9cff38ab870fe41909cd19) --- platform/android/export/export.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index fe61a5d2aa..663c66fe9f 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -602,7 +602,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;