summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/playback.c13
-rw-r--r--docs/CREDITS1
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c
index c7c0b5e9c4..f41cca64a2 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -559,7 +559,6 @@ int audio_current_aa_hid(void)
559struct mp3entry* audio_current_track(void) 559struct mp3entry* audio_current_track(void)
560{ 560{
561 const char *filename; 561 const char *filename;
562 const char *p;
563 static struct mp3entry temp_id3; 562 static struct mp3entry temp_id3;
564 struct playlist_track_info trackinfo; 563 struct playlist_track_info trackinfo;
565 int cur_idx; 564 int cur_idx;
@@ -602,14 +601,12 @@ struct mp3entry* audio_current_track(void)
602 return &temp_id3; 601 return &temp_id3;
603#endif 602#endif
604 603
605 p = strrchr(filename, '/'); 604 strncpy(temp_id3.path, filename, sizeof(temp_id3.path)-1);
606 if (!p) 605 temp_id3.title = strrchr(temp_id3.path, '/');
607 p = filename; 606 if (!temp_id3.title)
607 temp_id3.title = &temp_id3.path[0];
608 else 608 else
609 p++; 609 temp_id3.title++;
610
611 strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1);
612 temp_id3.title = &temp_id3.path[0];
613 610
614 return &temp_id3; 611 return &temp_id3;
615} 612}
diff --git a/docs/CREDITS b/docs/CREDITS
index c1a0974a9f..f2244e9185 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -426,6 +426,7 @@ Eric Lassauge
426François Dinel 426François Dinel
427Francesco Rigoni 427Francesco Rigoni
428Joël Puik 428Joël Puik
429Klaas Bosteels
429 430
430The libmad team 431The libmad team
431The wavpack team 432The wavpack team