From 91243d1c1d3b2360aab5b134c74dcb279a9136d7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 Mar 2014 16:02:47 +0000 Subject: crash fix for time handling in HistoryStats 64 bits (thx to white_tiger) git-svn-id: http://svn.miranda-ng.org/main/trunk@8623 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryStats/src/column_split.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/HistoryStats/src/column_split.cpp') diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp index fd48189c48..48d47b579f 100644 --- a/plugins/HistoryStats/src/column_split.cpp +++ b/plugins/HistoryStats/src/column_split.cpp @@ -156,10 +156,10 @@ void ColSplit::impl_contactDataBeginAcquire() if (params.alignment == 1) { - DWORD dwOffset = 0; - tm offsetTM = *gmtime(reinterpret_cast(&dwOffset)); + time_t offset = 0; + struct tm* offsetTM = gmtime(&offset); - m_nTimeOffset = 86400 * ((offsetTM.tm_wday + 6) % 7); + m_nTimeOffset = 86400 * ((offsetTM->tm_wday + 6) % 7); } else { -- cgit v1.2.3