Kaydet (Commit) f207e131 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

fix windows build

VS2013 does not like stack-allocated arrays with runtime size

Change-Id: I58bd3a9feb6e2bef1b4a4f775669e5e3e03de5f7
Reviewed-on: https://gerrit.libreoffice.org/32922Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f89d7692
......@@ -16,6 +16,7 @@
#include <DbgHelp.h>
#include <rtl/ustrbuf.hxx>
#include <memory>
rtl_uString *osl_backtraceAsString(int maxNoStackFramesToDisplay)
{
......@@ -24,8 +25,8 @@ rtl_uString *osl_backtraceAsString(int maxNoStackFramesToDisplay)
HANDLE hProcess = GetCurrentProcess();
SymInitialize( hProcess, nullptr, true );
void * aStack[ maxNoStackFramesToDisplay ];
sal_uInt32 nFrames = CaptureStackBackTrace( 0, maxNoStackFramesToDisplay, aStack, nullptr );
std::unique_ptr<void*[]> aStack(new void*[ maxNoStackFramesToDisplay ]);
sal_uInt32 nFrames = CaptureStackBackTrace( 0, maxNoStackFramesToDisplay, aStack.get(), nullptr );
SYMBOL_INFO * pSymbol;
pSymbol = static_cast<SYMBOL_INFO *>(calloc( sizeof( SYMBOL_INFO ) + 1024 * sizeof( char ), 1 ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment