# HG changeset patch # User BioHazard # Date 1203025426 21600 # Node ID 2fe51f6ddb36b6db14dd0bbf21d61863b03cd879 # Parent fd19014c3254664e977f7398b382e6011a871fd4 Trim whitespace on front of mod titles. (Bugzilla #175) diff -r fd19014c3254 -r 2fe51f6ddb36 src/modplug/modplugbmp.cxx --- a/src/modplug/modplugbmp.cxx Tue Feb 12 02:25:03 2008 -0600 +++ b/src/modplug/modplugbmp.cxx Thu Feb 14 15:43:46 2008 -0600 @@ -548,7 +548,10 @@ aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000); gchar *tmps2 = MODPLUG_CONVERT(lSoundFile->GetTitle()); - aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmps2); + // Chop any leading spaces off. They are annoying in the playlist. + gchar *tmps3 = tmps2; // Make another pointer so tmps2 can still be free()d + while ( *tmps3 == ' ' ) tmps3++ ; + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmps3); g_free(tmps2); //unload the file