VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-08-05 16:51:56 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-08-05 22:36:51 (GMT)
commit75c13c9b7badb1d8ced874cccef57a6e37a85519 (patch)
tree9b355f497a7f2c9b9be69b42079f158a95d23a55
parentb0a6377878aad645adc0cf3a0d89188b1d0f1765 (diff)
downloadVeraCrypt-75c13c9b7badb1d8ced874cccef57a6e37a85519.zip
VeraCrypt-75c13c9b7badb1d8ced874cccef57a6e37a85519.tar.gz
Windows: Fix wrong error message when UTF-8 encoding of entered password exceeds the maximum supported length.
-rw-r--r--src/Common/Dlgcode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 42d9322..28eb380 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));
}
}