summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
commite2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch)
treeba79bdcede96f80039f8b88d2791f198b9ec2981 /plugins/Db3x_mmap/src
parentf8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff)
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src')
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp2
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp
index fdff3ce5ec..f80dd8f6e2 100644
--- a/plugins/Db3x_mmap/src/dbcrypt.cpp
+++ b/plugins/Db3x_mmap/src/dbcrypt.cpp
@@ -232,7 +232,7 @@ void CDb3Mmap::SetPassword(LPCTSTR ptszPassword)
}
else {
m_bUsesPassword = true;
- m_crypto->setPassword(ptrA(mir_utf8encodeT(ptszPassword)));
+ m_crypto->setPassword(T2Utf(ptszPassword));
}
UpdateMenuItem();
}
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index 4a6cb3d543..ec5fcb4184 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -125,7 +125,7 @@ bool CDb3Mmap::EnterPassword(const BYTE *pKey, const size_t keyLen)
if (IDOK != DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_LOGIN), 0, sttEnterPassword, (LPARAM)&param))
return false;
- m_crypto->setPassword(ptrA(mir_utf8encodeT(param.newPass)));
+ m_crypto->setPassword(T2Utf(param.newPass));
if (m_crypto->setKey(pKey, keyLen)) {
m_bUsesPassword = true;
SecureZeroMemory(&param, sizeof(param));
@@ -143,8 +143,7 @@ static bool CheckOldPassword(HWND hwndDlg, CDb3Mmap *db)
if (db->usesPassword()) {
TCHAR buf[100];
GetDlgItemText(hwndDlg, IDC_OLDPASS, buf, SIZEOF(buf));
- ptrA oldPass(mir_utf8encodeT(buf));
- if (!db->m_crypto->checkPassword(oldPass)) {
+ if (!db->m_crypto->checkPassword(T2Utf(buf))) {
SetDlgItemText(hwndDlg, IDC_HEADERBAR, TranslateT("Wrong old password entered!"));
return false;
}