From 1c51a76c7eab117bb6c74a3897a6df8197945c90 Mon Sep 17 00:00:00 2001 From: Bruna2803 Date: Wed, 5 May 2021 01:06:24 +0200 Subject: New VeraCrypt interface (for system encryption) with improved usability --- src/Common/Password.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Common/Password.c') diff --git a/src/Common/Password.c b/src/Common/Password.c index f2413b6d..f280de33 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -38,6 +38,7 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, char szTmp1Utf8[MAX_PASSWORD + 1]; char szTmp2Utf8[MAX_PASSWORD + 1]; int k = GetWindowTextLength (hPassword); + int j = GetWindowTextLength (hVerify); BOOL bEnable = FALSE; int utf8Len1, utf8Len2; @@ -49,8 +50,13 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, utf8Len1 = WideCharToMultiByte (CP_UTF8, 0, szTmp1, -1, szTmp1Utf8, MAX_PASSWORD + 1, NULL, NULL); utf8Len2 = WideCharToMultiByte (CP_UTF8, 0, szTmp2, -1, szTmp2Utf8, MAX_PASSWORD + 1, NULL, NULL); - if (wcscmp (szTmp1, szTmp2) != 0) + if (wcscmp (szTmp1, szTmp2) != 0){ bEnable = FALSE; + if(k>0){ + if(j>=k) + Warning ("WARNING_PASSWORD_NOT_IDENTICAL", hwndDlg); + } + } else if (utf8Len1 <= 0) bEnable = FALSE; else -- cgit v1.2.3