VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePasswordPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/VolumePasswordPanel.cpp')
-rwxr-xr-x[-rw-r--r--]src/Main/Forms/VolumePasswordPanel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp
index 9c0f06e..16fafa3 100644..100755
--- a/src/Main/Forms/VolumePasswordPanel.cpp
+++ b/src/Main/Forms/VolumePasswordPanel.cpp
@@ -278,7 +278,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;