diff --git a/playlist.c b/playlist.c index 64d8c07eeb..dd9ec187e9 100644 --- a/playlist.c +++ b/playlist.c @@ -438,10 +438,14 @@ size_t playlist_size(playlist_t *playlist) static bool playlist_read_file( playlist_t *playlist, const char *path) { - char buf[PLAYLIST_ENTRIES][1024] = {{0}}; + unsigned i; + char buf[PLAYLIST_ENTRIES][1024]; RFILE *file = filestream_open( path, RFILE_MODE_READ_TEXT, -1); + for (i = 0; i < PLAYLIST_ENTRIES; i++) + buf[i][0] = '\0'; + /* If playlist file does not exist, * create an empty playlist instead. */