VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePimWizardPage.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-25 01:35:17 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-25 01:46:32 +0100
commitb8a2e808c693a59e236b98c3274019e5a25b3089 (patch)
tree27780023676d1de97ac4dea47b7b1390628a732a /src/Main/Forms/VolumePimWizardPage.cpp
parente9d3ba0b113433f634324d2c407fba3e825af1ce (diff)
downloadVeraCrypt-b8a2e808c693a59e236b98c3274019e5a25b3089.tar.gz
VeraCrypt-b8a2e808c693a59e236b98c3274019e5a25b3089.zip
MacOSX: Add PIM value validity checks to workaround wxWidget bug that makes wxTextValidator useless when applied to a text control with password attribute (http://trac.wxwidgets.org/ticket/17185).
Diffstat (limited to 'src/Main/Forms/VolumePimWizardPage.cpp')
-rwxr-xr-x[-rw-r--r--]src/Main/Forms/VolumePimWizardPage.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp
index c5f5e889..0e3d4299 100644..100755
--- a/src/Main/Forms/VolumePimWizardPage.cpp
+++ b/src/Main/Forms/VolumePimWizardPage.cpp
@@ -38,7 +38,8 @@ namespace VeraCrypt
long pim = 0;
if (pimStr.IsEmpty())
return 0;
- if (pimStr.ToLong (&pim))
+ if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789")))
+ && pimStr.ToLong (&pim))
return (int) pim;
else
return -1;