Index: apps/playback.c =================================================================== --- apps/playback.c (revision 13988) +++ apps/playback.c (working copy) @@ -590,7 +590,6 @@ struct mp3entry* audio_current_track(void) { const char *filename; - const char *p; static struct mp3entry temp_id3; int cur_idx; int offset = ci.new_track + wps_offset; @@ -612,15 +611,13 @@ 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++; + temp_id3.title++; - strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1); - temp_id3.title = &temp_id3.path[0]; - return &temp_id3; }