Fix fallback format index in wxPropertyGetter wxUIntProperty code.

Don't crash by accessing an out of bands array element if the format string
index had been set to an invalid value, just use the default (decimal) format
in this case.

Closes #15984.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-02-17 23:55:08 +00:00
parent 9ff8e5534b
commit cdcb63bf18

View File

@@ -530,7 +530,7 @@ wxString wxUIntProperty::ValueToString( wxVariant& value,
{
size_t index = m_base + m_prefix;
if ( index >= wxPG_UINT_TEMPLATE_MAX )
index = wxPG_BASE_DEC;
index = wxPG_UINT_DEC;
if ( value.GetType() == wxPG_VARIANT_TYPE_LONG )
{