From 9487c9cfe6ab1572444fed37d234a4abfd18f3fb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 Mar 2014 13:18:41 +0000 Subject: verba volant, scripta manent git-svn-id: http://svn.miranda-ng.org/main/trunk@8622 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbcontacts.cpp | 1 + plugins/Db3x_mmap/src/init.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/Db3x_mmap/src') diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 7d8fc5a143..7f93d731a1 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -388,6 +388,7 @@ void CDb3Mmap::ConvertContacts() DBContact *pPrev = NULL; m_dbHeader.ofsUser = ReallocSpace(m_dbHeader.ofsUser, OLD_CONTACT_SIZE, sizeof(DBContact)); + DBWrite(0, &m_dbHeader, sizeof(m_dbHeader)); for (DWORD dwOffset = m_dbHeader.ofsFirstContact; dwOffset != 0;) { DBContact *pOld = (DBContact*)DBRead(dwOffset, sizeof(DBContact), NULL); diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index f2236976a6..d283f944cb 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -80,14 +80,14 @@ static MIDatabase* LoadDatabase(const TCHAR *profile, BOOL bReadOnly) return db.release(); } -static int UnloadDatabase(MIDatabase* db) +static int UnloadDatabase(MIDatabase *db) { g_Dbs.remove((CDb3Mmap*)db); delete (CDb3Mmap*)db; return 0; } -MIDatabaseChecker* CheckDb(const TCHAR* profile, int *error) +MIDatabaseChecker* CheckDb(const TCHAR *profile, int *error) { std::auto_ptr db(new CDb3Mmap(profile, true)); if (db->Load(true) != ERROR_SUCCESS) { -- cgit v1.2.3