VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-06-21 19:46:21 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-06-21 20:47:01 +0200
commitf927ce9b58b137846bb78a47f5a83f7261eac9ff (patch)
treea5c60e363a8de1f7f450528440984e94f0363270 /src/Common/Password.c
parent5d9d49e989fa619ad0cd36951c3ba17a6f765346 (diff)
downloadVeraCrypt-f927ce9b58b137846bb78a47f5a83f7261eac9ff.tar.gz
VeraCrypt-f927ce9b58b137846bb78a47f5a83f7261eac9ff.zip
Windows: Add a dedicate page for volume PIM in the volume creation wizard
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 79566877..3ae264d2 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -107,10 +107,10 @@ BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw)
}
-BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot)
+BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pin, BOOL bForBoot, BOOL bSkipPasswordWarning)
{
BOOL bCustomPinSmall = ((pin != 0) && (pin < (bForBoot? 98 : 485)))? TRUE : FALSE;
- if (GetWindowTextLength (hwndItem) < PASSWORD_LEN_WARNING)
+ if (passwordLength < PASSWORD_LEN_WARNING)
{
if (bCustomPinSmall)
{
@@ -119,7 +119,7 @@ BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot)
}
#ifndef _DEBUG
- if (MessageBoxW (hwndDlg, GetString ("PASSWORD_LENGTH_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)
+ if (!bSkipPasswordWarning && (MessageBoxW (hwndDlg, GetString ("PASSWORD_LENGTH_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES))
return FALSE;
#endif
}