VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePimWizardPage.cpp
diff options
context:
space:
mode:
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;