diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-15 18:49:34 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-15 18:49:34 +0300 |
commit | 5c1e5146728e8bbbc97c521f7f7dc6837f681e0e (patch) | |
tree | 3d1649d815c69872f8c65ecdc540e262174a7e3e /plugins/Dbx_sqlite/src/dbevents.cpp | |
parent | 285a9b30de435bcb016a2fb4073aa76da31042a9 (diff) |
fixes #4676 (NewStory: сообщение пропадает после добавления в закладки)
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp')
-rw-r--r-- | plugins/Dbx_sqlite/src/dbevents.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 3071373b5b..a376f9e8ca 100644 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -266,14 +266,17 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei) DBEVENTINFO tmp = *dbei;
mir_ptr<char> pCryptBlob;
- if (m_bEncrypted && tmp.pBlob) {
- size_t len;
- char *pResult = (char*)m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
- if (pResult != nullptr) {
- pCryptBlob = tmp.pBlob = pResult;
- tmp.cbBlob = (uint16_t)len;
- tmp.flags |= DBEF_ENCRYPTED;
+ if (m_bEncrypted) {
+ if (tmp.pBlob) {
+ size_t len;
+ char *pResult = (char *)m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
+ if (pResult != nullptr) {
+ pCryptBlob = tmp.pBlob = pResult;
+ tmp.cbBlob = (uint16_t)len;
+ tmp.flags |= DBEF_ENCRYPTED;
+ }
}
+ else tmp.flags |= DBEF_ENCRYPTED;
}
mir_cslockfull lock(m_csDbAccess);
|