use a constant instead of hardcoded value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,6 +27,14 @@
|
|||||||
|
|
||||||
#if wxUSE_DBGHELP
|
#if wxUSE_DBGHELP
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// constants
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// to prevent recursion which could result from corrupted data we limit
|
||||||
|
// ourselves to that many levels of embedded fields inside structs
|
||||||
|
static const unsigned MAX_DUMP_DEPTH = 20;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// globals
|
// globals
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -286,7 +294,7 @@ wxDbgHelpDLL::DumpField(PSYMBOL_INFO pSym, void *pVariable, unsigned level)
|
|||||||
wxString s;
|
wxString s;
|
||||||
|
|
||||||
// avoid infinite recursion
|
// avoid infinite recursion
|
||||||
if ( level > 100 )
|
if ( level > MAX_DUMP_DEPTH )
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user