Commit dcb5ca20 authored by Max Kellermann's avatar Max Kellermann

db/DatabasePlaylist: increment only one variable

Fixes "searchaddpl" bug emitting bogus error "Bad position". Closes https://github.com/MusicPlayerDaemon/MPD/issues/1338
parent 77df5a8f
ver 0.23.5 (not yet released)
* protocol
- fix "searchaddpl" bug (bogus error "Bad position")
* migrate to PCRE2
* GCC 12 build fixes
......
......@@ -53,10 +53,9 @@ SearchInsertIntoPlaylist(const Database &db, const Storage *storage,
unsigned n = 0;
db.Visit(selection, [&playlist, &position, &n, storage](const auto &song){
db.Visit(selection, [&playlist, position, &n, storage](const auto &song){
playlist.Insert(position + n,
DatabaseDetachSong(storage, song));
++position;
++n;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment