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:
3
src/Main/Forms/VolumePasswordPanel.cpp
Normal file → Executable file
3
src/Main/Forms/VolumePasswordPanel.cpp
Normal file → Executable 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;
|
||||
|
||||
Reference in New Issue
Block a user