VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main/Forms/VolumePasswordPanel.cpp6
-rw-r--r--src/Main/Forms/VolumePimWizardPage.cpp6
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
@@ -459,7 +459,11 @@ 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);
}
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
@@ -110,7 +110,11 @@ namespace VeraCrypt
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();