From 54c7e1cfd3a98368352028def5faaedc017edc17 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 3 Nov 2019 22:55:21 +0100 Subject: Windows: Display error message when password is too long and legacy maximum length used --- src/Common/Dlgcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Common') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 2439c106..376a1b29 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -13104,7 +13104,7 @@ BOOL GetPassword (HWND hwndDlg, UINT ctrlID, char* passValue, int bufSize, BOOL { SetFocus (GetDlgItem(hwndDlg, ctrlID)); if (GetLastError () == ERROR_INSUFFICIENT_BUFFER) - Error ("PASSWORD_UTF8_TOO_LONG", hwndDlg); + Error ((bufSize == (MAX_LEGACY_PASSWORD + 1))? "LEGACY_PASSWORD_UTF8_TOO_LONG": "PASSWORD_UTF8_TOO_LONG", hwndDlg); else Error ("PASSWORD_UTF8_INVALID", hwndDlg); } -- cgit v1.2.3