From 2b601741826ff15a955648dd3cd6f92138072e2b Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 16 Jan 2006 07:39:04 +0000 Subject: [PATCH] Ignore any part of the file before src. gcc replaces __FILE__ with the name of the file as it was passed to it. Xcode invokes gcc with absolute paths. This makes crash logs slightly easier to read. --- stepmania/src/RageThreads.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RageThreads.cpp b/stepmania/src/RageThreads.cpp index 405e0537cc..df4877d0bb 100644 --- a/stepmania/src/RageThreads.cpp +++ b/stepmania/src/RageThreads.cpp @@ -374,7 +374,9 @@ void Checkpoints::SetCheckpoint( const char *file, int line, const char *message /* We can't ASSERT here, since that uses checkpoints. */ if( slot == NULL ) sm_crash( "GetUnknownThreadSlot() returned NULL" ); - + + /* Ignore everything before the first "src/". */ + file = strstr( file, "src/" ) ?: file; slot->Checkpoints[slot->CurCheckpoint].Set( file, line, message ); if( g_LogCheckpoints )