diff --git a/NEWS b/NEWS index 4ebb03969..5d5b4c260 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.23.5 (not yet released) +* protocol + - fix "searchaddpl" bug (bogus error "Bad position") * migrate to PCRE2 * GCC 12 build fixes diff --git a/src/db/DatabasePlaylist.cxx b/src/db/DatabasePlaylist.cxx index 0e14a97fc..7d86b4b62 100644 --- a/src/db/DatabasePlaylist.cxx +++ b/src/db/DatabasePlaylist.cxx @@ -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; });