1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: Fix wrong error message when UTF-8 encoding of entered password exceeds the maximum supported length.

This commit is contained in:
Mounir IDRASSI
2020-08-05 18:51:56 +02:00
parent b0a6377878
commit 75c13c9b7b

View File

@@ -13251,7 +13251,6 @@ BOOL GetPassword (HWND hwndDlg, UINT ctrlID, char* passValue, int bufSize, BOOL
passValue [0] = 0;
if (bShowError)
{
SetFocus (GetDlgItem(hwndDlg, ctrlID));
if (GetLastError () == ERROR_INSUFFICIENT_BUFFER)
{
DWORD dwTextSize = (DWORD) wcslen (GetString ("PASSWORD_UTF8_TOO_LONG")) + 16;
@@ -13266,6 +13265,7 @@ BOOL GetPassword (HWND hwndDlg, UINT ctrlID, char* passValue, int bufSize, BOOL
}
else
Error ("PASSWORD_UTF8_INVALID", hwndDlg);
SetFocus (GetDlgItem(hwndDlg, ctrlID));
}
}