From 592c0aa6a81e2b316731907a4c8d1657e11800e5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 17 Feb 2014 23:52:56 +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/trunk@75902 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 d0508afa70..2b4d2ce11a 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -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 ) {