Skip to content

Commit

Permalink
Initilize timestruct
Browse files Browse the repository at this point in the history
Otherwise we crash under 32bit Haiku
  • Loading branch information
humdingerb committed Oct 20, 2024
1 parent 1684ac3 commit e0038dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e0038dd

Please sign in to comment.