diff options
author | Robert Pösel <robyer@seznam.cz> | 2017-03-23 20:37:38 +0100 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2017-03-23 20:37:38 +0100 |
commit | 43ba08f91ea6e7a32e4a11418c434e1ea36314c8 (patch) | |
tree | 4ac0e977da30678716ef0841ae989d4e244e1be3 /protocols/MSN/src/msn_opts.cpp | |
parent | 61fde2711609ea8a2f1005f21d9ec4502044bce1 (diff) |
MSN: Raised password length limit to 99 chars (fixes #658)
It might be rewritten better to remove any limit though.
Diffstat (limited to 'protocols/MSN/src/msn_opts.cpp')
-rw-r--r-- | protocols/MSN/src/msn_opts.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index 6bd1191b8e..02f9706da4 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -89,12 +89,12 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetDlgItemTextA(hwndDlg, IDC_HANDLE, proto->MyOptions.szEmail);
- char tBuffer[MAX_PATH];
- if (!db_get_static(NULL, proto->m_szModuleName, "Password", tBuffer, sizeof(tBuffer))) {
- tBuffer[16] = 0;
- SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
+ char szPassword[100];
+ if (!db_get_static(NULL, proto->m_szModuleName, "Password", szPassword, sizeof(szPassword))) {
+ tBuffer[99] = 0;
+ SetDlgItemTextA(hwndDlg, IDC_PASSWORD, szPassword);
}
- SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_SETLIMITTEXT, 16, 0);
+ SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_SETLIMITTEXT, 99, 0);
HWND wnd = GetDlgItem(hwndDlg, IDC_HANDLE2);
DBVARIANT dbv;
@@ -115,6 +115,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP EnableWindow(GetDlgItem(hwndDlg, IDC_MAILER_APP), tValue);
EnableWindow(GetDlgItem(hwndDlg, IDC_ENTER_MAILER_APP), tValue);
+ char tBuffer[MAX_PATH];
if (!db_get_static(NULL, proto->m_szModuleName, "MailerPath", tBuffer, sizeof(tBuffer)))
SetDlgItemTextA(hwndDlg, IDC_MAILER_APP, tBuffer);
@@ -514,12 +515,12 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L CMsnProto* proto = (CMsnProto*)lParam;
SetDlgItemTextA(hwndDlg, IDC_HANDLE, proto->MyOptions.szEmail);
- char tBuffer[MAX_PATH];
- if (!db_get_static(NULL, proto->m_szModuleName, "Password", tBuffer, sizeof(tBuffer))) {
- tBuffer[16] = 0;
- SetDlgItemTextA(hwndDlg, IDC_PASSWORD, tBuffer);
+ char szPassword[100];
+ if (!db_get_static(NULL, proto->m_szModuleName, "Password", szPassword, sizeof(szPassword))) {
+ tBuffer[99] = 0;
+ SetDlgItemTextA(hwndDlg, IDC_PASSWORD, szPassword);
}
- SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_SETLIMITTEXT, 16, 0);
+ SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_SETLIMITTEXT, 99, 0);
DBVARIANT dbv;
if (!proto->getWString("Place", &dbv)) {
|