diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-02 17:03:03 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-02 19:36:52 +0200 |
commit | a0f2ffb90bf004b08fc4d3e317718d5a78fb54d5 (patch) | |
tree | b2ac6755898c977f9a4dac1a35710995722e8252 /src/Common | |
parent | 2db0061741792c5303e31785d41ad07694646492 (diff) | |
download | VeraCrypt-a0f2ffb90bf004b08fc4d3e317718d5a78fb54d5.tar.gz VeraCrypt-a0f2ffb90bf004b08fc4d3e317718d5a78fb54d5.zip |
Windows: when mounting multiple favorites, use PIM of previous favorite alongside its password if option "Include PIM when caching password" is selected alongside option "Temporarily cache password during Mount Favorite Volumes operations".
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Dlgcode.c | 8 | ||||
-rw-r--r-- | src/Common/Dlgcode.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index d90c1e89..eca8dea5 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -5801,7 +5801,7 @@ BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (benchmarkType == BENCHMARK_TYPE_PRF) { - benchmarkPim = GetPim (hwndDlg, IDC_PIM); + benchmarkPim = GetPim (hwndDlg, IDC_PIM, 0); benchmarkPreBoot = GetCheckBox (hwndDlg, IDC_BENCHMARK_PREBOOT); } else @@ -12670,9 +12670,9 @@ std::wstring FindLatestFileOrDirectory (const std::wstring &directory, const wch return wstring (directory) + L"\\" + name; } -int GetPim (HWND hwndDlg, UINT ctrlId) +int GetPim (HWND hwndDlg, UINT ctrlId, int defaultPim) { - int pim = 0; + int pim = defaultPim; HWND hCtrl = GetDlgItem (hwndDlg, ctrlId); if (IsWindowEnabled (hCtrl) && IsWindowVisible (hCtrl)) { @@ -12682,7 +12682,7 @@ int GetPim (HWND hwndDlg, UINT ctrlId) wchar_t* endPtr = NULL; pim = wcstol(szTmp, &endPtr, 10); if (pim < 0 || endPtr == szTmp || !endPtr || *endPtr != L'\0') - pim = 0; + pim = defaultPim; } } return pim; diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index c81c802c..2849aa5e 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -503,7 +503,7 @@ BOOL VolumePathExists (const wchar_t *volumePath); BOOL IsWindowsIsoBurnerAvailable (); BOOL LaunchWindowsIsoBurner (HWND hwnd, const wchar_t *isoPath); BOOL IsApplicationInstalled (const wchar_t *appName); -int GetPim (HWND hwndDlg, UINT ctrlId); +int GetPim (HWND hwndDlg, UINT ctrlId, int defaultPim); void SetPim (HWND hwndDlg, UINT ctrlId, int pim); BOOL GetPassword (HWND hwndDlg, UINT ctrlID, char* passValue, int bufSize, BOOL bShowError); void SetPassword (HWND hwndDlg, UINT ctrlID, char* passValue); |