summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbcontacts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-21 15:04:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-21 15:04:18 +0000
commitf9e33a21e734d927f224cf93fd7be05dce3f7391 (patch)
tree12e52da87181c0725aa9d7740c09d7315d4fb533 /plugins/Db3x_mmap/src/dbcontacts.cpp
parent310cdd11d658f232ab9b05a7b39cc9c3d9a00436 (diff)
- CDb3Mmap::FillContacts(): returned support for the old contact's format;
- CDb3Mmap::AdaptEvent: fast enough method to unify old & new event's formats; - CDb3Mmap::m_csDbAccess finally switched to mir_cs; - code cleaning; - pre-release version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@11556 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcontacts.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index f2ed1da4f1..c497b10214 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -400,9 +400,13 @@ void CDb3Mmap::FillContacts()
if (p->signature != DBCONTACT_SIGNATURE)
break;
- DWORD dwContactID = p->dwContactID;
- if (dwContactID >= m_dwMaxContactId)
- m_dwMaxContactId = dwContactID + 1;
+ DWORD dwContactID;
+ if (m_dbHeader.version >= DB_095_VERSION) {
+ dwContactID = p->dwContactID;
+ if (dwContactID > m_dwMaxContactId)
+ m_dwMaxContactId = dwContactID + 1;
+ }
+ else dwContactID = m_dwMaxContactId++;
DBCachedContact *cc = m_cache->AddContactToCache(dwContactID);
cc->dwDriverData = dwOffset;