VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePasswordPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/VolumePasswordPanel.cpp')
-rw-r--r--src/Main/Forms/VolumePasswordPanel.cpp6
1 files changed, 5 insertions, 1 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);
}