Fix usage of pointer to stack allocated array outside of the scope the array was declared in

git-svn-id: https://svn.eduke32.com/eduke32@7061 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-10-10 19:15:12 +00:00
parent b50b1ad198
commit 941aa87bce

View file

@ -45,7 +45,8 @@ LONG MiniDumper::TopLevelFilter( struct _EXCEPTION_POINTERS *pExceptionInfo )
hDll = ::LoadLibrary( "DBGHELP.DLL" ); hDll = ::LoadLibrary( "DBGHELP.DLL" );
} }
LPCTSTR szResult = NULL; LPCTSTR szResult = "DBGHELP.DLL not found";;
char szScratch [_MAX_PATH];
if (hDll) if (hDll)
{ {
@ -53,7 +54,6 @@ LONG MiniDumper::TopLevelFilter( struct _EXCEPTION_POINTERS *pExceptionInfo )
if (pDump) if (pDump)
{ {
char szDumpPath[_MAX_PATH]; char szDumpPath[_MAX_PATH];
char szScratch [_MAX_PATH];
// work out a good place for the dump file // work out a good place for the dump file
/*if (!GetTempPath( _MAX_PATH, szDumpPath )) /*if (!GetTempPath( _MAX_PATH, szDumpPath ))
@ -104,12 +104,7 @@ LONG MiniDumper::TopLevelFilter( struct _EXCEPTION_POINTERS *pExceptionInfo )
szResult = "DBGHELP.DLL too old"; szResult = "DBGHELP.DLL too old";
} }
} }
else
{
szResult = "DBGHELP.DLL not found";
}
if (szResult)
::MessageBox( NULL, szResult, m_szAppName, MB_OK ); ::MessageBox( NULL, szResult, m_szAppName, MB_OK );
return retval; return retval;