1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

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).

This commit is contained in:
Mounir IDRASSI
2016-01-25 01:35:17 +01:00
parent e9d3ba0b11
commit b8a2e808c6
5 changed files with 50 additions and 5 deletions

3
src/Main/Forms/VolumePasswordPanel.cpp Normal file → Executable file
View File

@@ -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;