From 94886b6d06626274bf2dacb7c8a534f6e56318ec Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 29 Mar 2006 05:19:13 +0000 Subject: [PATCH] clean up thread checkpoints output --- stepmania/src/RageThreads.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stepmania/src/RageThreads.cpp b/stepmania/src/RageThreads.cpp index 44b567da9b..ceac04dfff 100644 --- a/stepmania/src/RageThreads.cpp +++ b/stepmania/src/RageThreads.cpp @@ -91,6 +91,17 @@ void ThreadSlot::ThreadCheckpoint::Set( const char *szFile, int iLine, const cha m_szFile = szFile; m_iLine = iLine; m_szMessage = szMessage; + + /* Skip any path components. */ + if( m_szFile != NULL ) + { + const char *p = strrchr( m_szFile, '/' ); + if( p == NULL ) + p = strrchr( m_szFile, '\\' ); + if( p != NULL && p[1] != '\0' ) + m_szFile = p+1; + } + sprintf( m_szFormattedBuf, " %s:%i %s", m_szFile, m_iLine, m_szMessage? m_szMessage:"" ); }