diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-15 16:02:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-15 16:02:47 +0000 |
commit | 91243d1c1d3b2360aab5b134c74dcb279a9136d7 (patch) | |
tree | 0d3944785bce7dba47545d384e5f061c025e7616 /plugins/HistoryStats/src/settings.cpp | |
parent | 9487c9cfe6ab1572444fed37d234a4abfd18f3fb (diff) |
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
Diffstat (limited to 'plugins/HistoryStats/src/settings.cpp')
-rw-r--r-- | plugins/HistoryStats/src/settings.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/HistoryStats/src/settings.cpp b/plugins/HistoryStats/src/settings.cpp index 207af935ae..bd591b231c 100644 --- a/plugins/HistoryStats/src/settings.cpp +++ b/plugins/HistoryStats/src/settings.cpp @@ -47,19 +47,19 @@ Settings::Filter::Filter(const ext::string& strID) : m_strID(strID), m_nMode(fwmWordsMatching), m_nRef(0)
{
time_t curTime = time(NULL);
- struct tm curTM = *localtime(&curTime);
+ struct tm* curTM = localtime(&curTime);
- m_strName += utils::intToPadded(1900 + curTM.tm_year, 4);
+ m_strName += utils::intToPadded(1900 + curTM->tm_year, 4);
m_strName += _T("-");
- m_strName += utils::intToPadded(1 + curTM.tm_mon, 2);
+ m_strName += utils::intToPadded(1 + curTM->tm_mon, 2);
m_strName += _T("-");
- m_strName += utils::intToPadded(curTM.tm_mday, 2);
+ m_strName += utils::intToPadded(curTM->tm_mday, 2);
m_strName += _T(" ");
- m_strName += utils::intToPadded(curTM.tm_hour, 2);
+ m_strName += utils::intToPadded(curTM->tm_hour, 2);
m_strName += _T(":");
- m_strName += utils::intToPadded(curTM.tm_min, 2);
+ m_strName += utils::intToPadded(curTM->tm_min, 2);
m_strName += _T(":");
- m_strName += utils::intToPadded(curTM.tm_sec, 2);
+ m_strName += utils::intToPadded(curTM->tm_sec, 2);
m_strName += _T(".");
m_strName += utils::intToPadded(GetTickCount() % 1000, 3);
}
|