fix(subsonic): update music folder id in bounds check

fixes #271
This commit is contained in:
sentriz
2022-12-12 20:02:28 +00:00
parent ce31310571
commit c6ddee8f7e

View File

@@ -35,7 +35,7 @@ func getMusicFolder(musicPaths paths.MusicPaths, p params.Params) string {
if err != nil {
return ""
}
if idx < 0 || idx > len(musicPaths) {
if idx < 0 || idx >= len(musicPaths) {
return ""
}
return musicPaths[idx].Path