diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-08-05 18:51:56 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-08-06 00:36:51 +0200 |
commit | 75c13c9b7badb1d8ced874cccef57a6e37a85519 (patch) | |
tree | 9b355f497a7f2c9b9be69b42079f158a95d23a55 /src/Common | |
parent | b0a6377878aad645adc0cf3a0d89188b1d0f1765 (diff) | |
download | VeraCrypt-75c13c9b7badb1d8ced874cccef57a6e37a85519.tar.gz VeraCrypt-75c13c9b7badb1d8ced874cccef57a6e37a85519.zip |
Windows: Fix wrong error message when UTF-8 encoding of entered password exceeds the maximum supported length.
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Dlgcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 42d93224..28eb3803 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -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)); } } |