summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-09-04 17:44:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-09-04 17:44:16 +0000
commit387bba529b2a8878a6c66661c09fc02622fe32ea (patch)
tree9d64e9f7ffba8dafe03d4cfacb0489ecb77f13bb /plugins/Db3x_mmap
parent71b61f966447f5ee8b0c4329d74ce0c8b3e693ab (diff)
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
Diffstat (limited to 'plugins/Db3x_mmap')
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp4
1 files changed, 2 insertions, 2 deletions
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];