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/trunk@75902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-02-17 23:52:56 +00:00
parent 78be29a447
commit 592c0aa6a8

View File

@@ -531,7 +531,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 )
{