diff --git a/stepmania/src/RageThreads.cpp b/stepmania/src/RageThreads.cpp index f1bd4bbf7e..a1b5b5a0af 100644 --- a/stepmania/src/RageThreads.cpp +++ b/stepmania/src/RageThreads.cpp @@ -382,26 +382,25 @@ static const char *GetCheckpointLog( int slotno, int lineno ) return slot.ThreadFormattedOutput; } -const char *Checkpoints::GetLogs( const char *delim ) +/* XXX: iSize check unimplemented */ +void Checkpoints::GetLogs( char *pBuf, int iSize, const char *delim ) { - static char ret[1024*32]; - ret[0] = 0; + pBuf[0] = 0; for( int slotno = 0; slotno < MAX_THREADS; ++slotno ) { const char *buf = GetCheckpointLog( slotno, 0 ); if( buf == NULL ) continue; - strcat( ret, buf ); - strcat( ret, delim ); + strcat( pBuf, buf ); + strcat( pBuf, delim ); for( int line = 1; (buf = GetCheckpointLog( slotno, line )) != NULL; ++line ) { - strcat( ret, buf ); - strcat( ret, delim ); + strcat( pBuf, buf ); + strcat( pBuf, delim ); } } - return ret; } /* diff --git a/stepmania/src/RageThreads.h b/stepmania/src/RageThreads.h index 91fc9feb56..042dcd0f84 100644 --- a/stepmania/src/RageThreads.h +++ b/stepmania/src/RageThreads.h @@ -43,7 +43,7 @@ namespace Checkpoints { void LogCheckpoints( bool yes=true ); void SetCheckpoint( const char *file, int line, const char *message ); - const char *GetLogs( const char *delim ); + void GetLogs( char *pBuf, int iSize, const char *delim ); }; #define CHECKPOINT (Checkpoints::SetCheckpoint(__FILE__, __LINE__, NULL))