changeset 2388:2fe51f6ddb36

Trim whitespace on front of mod titles. (Bugzilla #175)
author BioHazard <biohazard@bak.rr.com>
date Thu, 14 Feb 2008 15:43:46 -0600
parents fd19014c3254
children 46d3e970f0a5
files src/modplug/modplugbmp.cxx
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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