diff options
Diffstat (limited to 'plugins/Dbx_mdb/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbcontacts.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdb/src/dbcontacts.cpp index 1ca1230f41..9b4775990c 100644 --- a/plugins/Dbx_mdb/src/dbcontacts.cpp +++ b/plugins/Dbx_mdb/src/dbcontacts.cpp @@ -339,9 +339,11 @@ void CDbxMdb::FillContacts() DBCachedContact *cc = arContacts[i];
CheckProto(cc, "");
- m_dwMaxContactId = cc->contactID+1;
+ m_dwMaxContactId = max(m_dwMaxContactId, cc->contactID+1);
m_contactCount++;
+ m_dwMaxEventId = max(m_dwMaxEventId, FindLastEvent(cc->contactID) + 1);
+
DBVARIANT dbv; dbv.type = DBVT_DWORD;
cc->nSubs = (0 != GetContactSetting(cc->contactID, META_PROTO, "NumContacts", &dbv)) ? -1 : dbv.dVal;
if (cc->nSubs != -1) {
|