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:
Vadim Zeitlin
2005-06-29 22:05:08 +00:00
parent 05a0bcdec6
commit 97799a969b

View File

@@ -27,6 +27,14 @@
#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
// ----------------------------------------------------------------------------
@@ -286,7 +294,7 @@ wxDbgHelpDLL::DumpField(PSYMBOL_INFO pSym, void *pVariable, unsigned level)
wxString s;
// avoid infinite recursion
if ( level > 100 )
if ( level > MAX_DUMP_DEPTH )
{
return s;
}