diff --git a/stepmania/src/archutils/Unix/CrashHandler.cpp b/stepmania/src/archutils/Unix/CrashHandler.cpp index 3e6aaeefd8..fd200add17 100644 --- a/stepmania/src/archutils/Unix/CrashHandler.cpp +++ b/stepmania/src/archutils/Unix/CrashHandler.cpp @@ -182,12 +182,12 @@ static void parent_process( int to_child, const CrashData *crash ) } /* 5. Write CHECKPOINTs. */ - p = Checkpoints::GetLogs("\n"); - size = strlen(p)+1; + static char buf[1024*32]; + Checkpoints::GetLogs( buf, sizeof(buf), "\n" ); + size = strlen(buf)+1; if( !parent_write(to_child, &size, sizeof(size)) ) return; - - if( !parent_write(to_child, p, size) ) + if( !parent_write(to_child, buf, size) ) return; /* 6. Write the crashed thread's name. */ diff --git a/stepmania/src/archutils/Win32/Crash.cpp b/stepmania/src/archutils/Win32/Crash.cpp index ec04e96b7c..1537483829 100644 --- a/stepmania/src/archutils/Win32/Crash.cpp +++ b/stepmania/src/archutils/Win32/Crash.cpp @@ -795,7 +795,9 @@ static void DoSave() Report(NULL, hFile, ""); // Dump thread stacks - WriteBuf( hFile, Checkpoints::GetLogs("\r\n") ); + static char buf[1024*32]; + Checkpoints::GetLogs( buf, sizeof(buf), "\r\n" ); + WriteBuf( hFile, buf ); Report(NULL, hFile, ""); ReportCallStack( NULL, hFile, g_CrashInfo.m_BacktracePointers );