summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-04-02 14:29:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-04-02 14:29:00 +0300
commit706a3777be772ecb5b7c243a5bc4df1bc33a9e57 (patch)
tree995ce425b79a1e9f8a5bfbd191b83ef55e4e1537 /plugins/Dbx_sqlite
parentddb0257fa84d916858009633ff91daf8d2578fd9 (diff)
code cleaning
Diffstat (limited to 'plugins/Dbx_sqlite')
-rw-r--r--plugins/Dbx_sqlite/src/dbcrypt.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Dbx_sqlite/src/dbcrypt.cpp b/plugins/Dbx_sqlite/src/dbcrypt.cpp
index e10b0d1be3..86f74505d8 100644
--- a/plugins/Dbx_sqlite/src/dbcrypt.cpp
+++ b/plugins/Dbx_sqlite/src/dbcrypt.cpp
@@ -190,16 +190,16 @@ STDMETHODIMP_(BOOL) CDbxSQLite::EnableEncryption(BOOL bEncrypt)
sqlite3_bind_int(upd, 1, (bEncrypt) ? DBVT_ENCRYPTED : DBVT_UTF8);
size_t resultLen;
- mir_ptr<BYTE> pBuf;
+ ptrA pBuf;
if (bEncrypt) {
- pBuf = m_crypto->encodeString((char*)sqlite3_column_text(stmt, 3), &resultLen);
+ pBuf = (char*)m_crypto->encodeString((char*)sqlite3_column_text(stmt, 3), &resultLen);
sqlite3_bind_blob(upd, 2, pBuf, (int)resultLen, 0);
}
else {
- pBuf = (BYTE *)m_crypto->decodeString(sqlite3_column_text(stmt, 3), sqlite3_column_bytes(stmt, 3), &resultLen);
- sqlite3_bind_text(upd, 2, (char*)pBuf.get(), (int)resultLen, 0);
+ pBuf = (char*)m_crypto->decodeString(sqlite3_column_text(stmt, 3), sqlite3_column_bytes(stmt, 3), &resultLen);
+ sqlite3_bind_text(upd, 2, pBuf, (int)strlen(pBuf), 0);
}
-
+
sqlite3_bind_int(upd, 3, hContact);
sqlite3_bind_text(upd, 4, pszModule, (int)strlen(pszModule), 0);
sqlite3_bind_text(upd, 5, pszSetting, (int)strlen(pszSetting), 0);