diff options
-rw-r--r-- | src/Main/Forms/VolumePasswordPanel.cpp | 6 | ||||
-rw-r--r-- | src/Main/Forms/VolumePimWizardPage.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp index 49c960c2..3b624340 100644 --- a/src/Main/Forms/VolumePasswordPanel.cpp +++ b/src/Main/Forms/VolumePasswordPanel.cpp @@ -458,9 +458,13 @@ namespace VeraCrypt } void VolumePasswordPanel::WipeTextCtrl (wxTextCtrl *textCtrl) { - textCtrl->SetValue (wxString (L'X', textCtrl->GetLineLength(0))); + int txtLen = textCtrl->GetLineLength(0); + if (txtLen > 0) + { + textCtrl->SetValue (wxString (L'X', txtLen)); + } GetPassword (textCtrl); } bool VolumePasswordPanel::UpdatePimHelpText (bool pimChanged) diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp index 7ef8a3a0..c4f7014b 100644 --- a/src/Main/Forms/VolumePimWizardPage.cpp +++ b/src/Main/Forms/VolumePimWizardPage.cpp @@ -109,9 +109,13 @@ namespace VeraCrypt newTextCtrl->SetMinSize (VolumePimTextCtrl->GetSize()); PimSizer->Replace (VolumePimTextCtrl, newTextCtrl); VolumePimTextCtrl->Show (false); - VolumePimTextCtrl->SetValue (wxString (L'X', VolumePimTextCtrl->GetLineLength(0))); + int txtLen = VolumePimTextCtrl->GetLineLength(0); + if (txtLen > 0) + { + VolumePimTextCtrl->SetValue (wxString (L'X', txtLen)); + } GetVolumePim (); Fit(); Layout(); |