From 387bba529b2a8878a6c66661c09fc02622fe32ea Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 4 Sep 2014 17:44:16 +0000 Subject: fix for opening a database in r/o mode git-svn-id: http://svn.miranda-ng.org/main/trunk@10371 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbcontacts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/Db3x_mmap') diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 2fdf598252..cecd5f85b0 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -429,7 +429,7 @@ void CDb3Mmap::FillContacts() } // no need in conversion? quit then - if (arMetas.getCount() == 0) + if (m_bReadOnly || arMetas.getCount() == 0) return; DBVARIANT dbv; dbv.type = DBVT_DWORD; @@ -448,7 +448,7 @@ void CDb3Mmap::FillContacts() dbws.value.type = DBVT_DWORD; DBCachedContact *ccMeta = p->cc; - if (dbv.dVal < ccMeta->nSubs) { + if (int(dbv.dVal) < ccMeta->nSubs) { ccMeta->pSubs[dbv.dVal] = hh; char setting[100]; -- cgit v1.2.3