From 108d0abc52b5a37be5b07d54aa31394224f671c2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 Jan 2014 17:29:19 +0000 Subject: fix for decoding settings git-svn-id: http://svn.miranda-ng.org/main/trunk@7523 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbcrypt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbcrypt.cpp') diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index 18d9fd5043..155aa04eee 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -360,9 +360,9 @@ void CDb3Mmap::ToggleSettingsEncryption(HANDLE hContact) ptrA decoded(m_crypto->decodeString((PBYTE)(char*)p.szValue, p.iLen, &realLen)); if (decoded != NULL) { DBCONTACTWRITESETTING dbcws = { szModule, p.szVar }; - dbcws.value.type = DBVT_UTF8; + dbcws.value.type = DBVT_UNENCRYPTED; dbcws.value.pszVal = decoded; - dbcws.value.cchVal = (WORD)len; + dbcws.value.cchVal = (WORD)realLen; WriteContactSetting(hContact, &dbcws); } } @@ -371,7 +371,7 @@ void CDb3Mmap::ToggleSettingsEncryption(HANDLE hContact) if (!ofsNext) break; - setting = (DBContactSettings *)DBRead(offset = ofsNext, sizeof(DBContactSettings), NULL); + setting = (DBContactSettings*)DBRead(offset = ofsNext, sizeof(DBContactSettings), NULL); if ((szModule = GetModuleNameByOfs(setting->ofsModuleName)) == NULL) break; } -- cgit v1.2.3