From 09328f1364768480ba83b7dc9bd7f9235d8a0767 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 13 Mar 2014 13:14:59 +0000 Subject: fix for a crash (thx white_tiger for a patch) git-svn-id: http://svn.miranda-ng.org/main/trunk@8591 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryStats/src/mirandacontact.cpp | 16 ++++++++-------- plugins/HistoryStats/src/settingsserializer.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/HistoryStats') diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp index 4e9ddc482a..9549200179 100644 --- a/plugins/HistoryStats/src/mirandacontact.cpp +++ b/plugins/HistoryStats/src/mirandacontact.cpp @@ -193,7 +193,7 @@ void MirandaContactTolerantMerge::fillQueue() if (j_ei.hContact != ci.ei.hContact && timestampDelta >= -timestampTol && timestampDelta <= timestampTol && j_ei.dbe.eventType == ci.ei.dbe.eventType && - (j_ei.dbe.flags & ~(DBEF_FIRST | DBEF_READ)) == (ci.ei.dbe.flags & ~(DBEF_FIRST | DBEF_READ)) && + (j_ei.dbe.flags & ~DBEF_READ) == (ci.ei.dbe.flags & ~DBEF_READ) && j_ei.dbe.cbBlob == ci.ei.dbe.cbBlob && memcmp(j_ei.dbe.pBlob, ci.ei.dbe.pBlob, j_ei.dbe.cbBlob) == 0) { bIsDuplicate = true; @@ -254,14 +254,14 @@ void MirandaContactStrictMerge::fillQueue() if (timestampDelta > 0) insPos = j; - if (j_ei.hContact != ci.ei.hContact && - timestampDelta >= -timestampTol && timestampDelta <= timestampTol && - j_ei.dbe.eventType == ci.ei.dbe.eventType && - (j_ei.dbe.flags & ~(DBEF_FIRST | DBEF_READ)) == (ci.ei.dbe.flags & ~(DBEF_FIRST | DBEF_READ)) && - j_ei.dbe.cbBlob == ci.ei.dbe.cbBlob && - memcmp(j_ei.dbe.pBlob, ci.ei.dbe.pBlob, j_ei.dbe.cbBlob) == 0) { + if (j_ei.hContact != ci.ei.hContact + && timestampDelta >= -timestampTol && timestampDelta <= timestampTol + && j_ei.dbe.eventType == ci.ei.dbe.eventType + && (j_ei.dbe.flags & ~DBEF_READ) == (ci.ei.dbe.flags & ~DBEF_READ) + && j_ei.dbe.cbBlob == ci.ei.dbe.cbBlob + && memcmp(j_ei.dbe.pBlob, ci.ei.dbe.pBlob, j_ei.dbe.cbBlob) == 0) + { bIsDuplicate = true; - break; } } diff --git a/plugins/HistoryStats/src/settingsserializer.cpp b/plugins/HistoryStats/src/settingsserializer.cpp index dae50d05e4..5b3b428481 100644 --- a/plugins/HistoryStats/src/settingsserializer.cpp +++ b/plugins/HistoryStats/src/settingsserializer.cpp @@ -225,7 +225,7 @@ void SettingsSerializer::readFromDB() settingsTree.setKey(strPrefix.c_str()); FilterSet::iterator F = m_FilterWords.insert(Filter(settingsTree.readStr(con::KeyID, _T("")))).first; - Filter* curFilter = (Filter*)&F; + Filter* curFilter = (Filter*)&*F; curFilter->setName(settingsTree.readStr(con::KeyName, _T(""))); curFilter->setMode(settingsTree.readIntRanged(con::KeyMode, fwmWordsMatching, fwmFIRST, fwmLAST)); -- cgit v1.2.3