From e0038ddaeba3c4057eabba65bf189360d68485cf Mon Sep 17 00:00:00 2001 From: Humdinger Date: Sun, 20 Oct 2024 17:25:50 +0200 Subject: [PATCH] Initilize timestruct Otherwise we crash under 32bit Haiku --- src/Import.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Import.cpp b/src/Import.cpp index 81e798b..dc72b2d 100644 --- a/src/Import.cpp +++ b/src/Import.cpp @@ -483,7 +483,8 @@ QIFDateToDate(const BString& date) BStringList list; date.Split("/", true, list); - struct tm* timestruct; + time_t time = ::time(NULL); + struct tm* timestruct = localtime(&time); timestruct->tm_mon = atoi(list.StringAt(0)) - 1; timestruct->tm_mday = atoi(list.StringAt(1)); timestruct->tm_year = atoi(list.StringAt(2)) - 1900;