From b8a2e808c693a59e236b98c3274019e5a25b3089 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 25 Jan 2016 01:35:17 +0100 Subject: 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). --- src/Main/Forms/VolumePimWizardPage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/Main/Forms/VolumePimWizardPage.cpp (limited to 'src/Main/Forms/VolumePimWizardPage.cpp') diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp old mode 100644 new mode 100755 index c5f5e889..0e3d4299 --- 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; -- cgit v1.2.3