From f86be8fc0ea87cafcd2dd630af1c08e0cdacdaa9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 23 Jul 2012 21:25:22 +0000 Subject: minor addition git-svn-id: http://svn.miranda-ng.org/main/trunk@1145 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbsettings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/Db3x_mmap/src/dbsettings.cpp') diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index 4f3a2e5516..4a92bf7d4a 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -612,7 +612,7 @@ STDMETHODIMP_(BOOL) CDb3Base::WriteContactSetting(HANDLE hContact, DBCONTACTWRIT //make sure the module group exists ofsSettingsGroup = GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsContact,ofsModuleName); if (ofsSettingsGroup == 0) { //module group didn't exist - make it - if (tmp.value.type&DBVTF_VARIABLELENGTH) { + if (tmp.value.type & DBVTF_VARIABLELENGTH) { if (tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8) bytesRequired = (int)strlen(tmp.value.pszVal)+2; else if (tmp.value.type == DBVT_BLOB) bytesRequired = tmp.value.cpbVal+2; } @@ -705,6 +705,7 @@ STDMETHODIMP_(BOOL) CDb3Base::WriteContactSetting(HANDLE hContact, DBCONTACTWRIT DBContactSettings *dbcsPrev; DWORD ofsDbcsPrev,ofsNew; + InvalidateSettingsGroupOfsCacheEntry(ofsSettingsGroup); bytesRequired += (DB_SETTINGS_RESIZE_GRANULARITY-(bytesRequired%DB_SETTINGS_RESIZE_GRANULARITY))%DB_SETTINGS_RESIZE_GRANULARITY; //find previous group to change its offset ofsDbcsPrev = dbc.ofsFirstSettings; -- cgit v1.2.3