summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap')
-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;
}