diff options
| -rw-r--r-- | apps/playback.c | 13 | ||||
| -rw-r--r-- | docs/CREDITS | 1 |
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c index c7c0b5e..f41cca6 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -559,7 +559,6 @@ int audio_current_aa_hid(void) struct mp3entry* audio_current_track(void) { const char *filename; - const char *p; static struct mp3entry temp_id3; struct playlist_track_info trackinfo; int cur_idx; @@ -602,14 +601,12 @@ struct mp3entry* audio_current_track(void) return &temp_id3; #endif - p = strrchr(filename, '/'); - if (!p) - p = filename; + strncpy(temp_id3.path, filename, sizeof(temp_id3.path)-1); + temp_id3.title = strrchr(temp_id3.path, '/'); + if (!temp_id3.title) + temp_id3.title = &temp_id3.path[0]; else - p++; - - strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1); - temp_id3.title = &temp_id3.path[0]; + temp_id3.title++; return &temp_id3; } diff --git a/docs/CREDITS b/docs/CREDITS index c1a0974..f2244e9 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -426,6 +426,7 @@ Eric Lassauge François Dinel Francesco Rigoni Joël Puik +Klaas Bosteels The libmad team The wavpack team |