From c0d8847f3cf2164adc4aa556395b6fa4ca74c0f4 Mon Sep 17 00:00:00 2001 From: Robert Hak Date: Thu, 27 Jun 2002 08:20:09 +0000 Subject: account for white space at the end of a filename git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1225 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'apps') diff --git a/apps/playlist.c b/apps/playlist.c index bd5c2b2053..c7d1505ae3 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -58,6 +58,11 @@ char* playlist_next(int steps) (seek < max)) seek++; + /* Now work back killing white space */ + while((now_playing[seek-1] == ' ') || + (now_playing[seek-1] == '\t')) + seek--; + now_playing[seek]=0; /* replace backslashes with forward slashes */ @@ -243,3 +248,12 @@ void randomise_playlist( playlist_info_t *playlist, unsigned int seed ) * eval: (load-file "../firmware/rockbox-mode.el") * end: */ + + + + + + + + + -- cgit v1.2.3