From cdcb63bf18e4cc3971f666e6cf5fe1c24694658c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 17 Feb 2014 23:55:08 +0000 Subject: [PATCH] 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 --- src/propgrid/props.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 710b8a03ec..bfe04e9578 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -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 ) {