mpd/src/song
Linux-Fan, Ma_Sys.ma 6db4b818e6 song/Filter: Fix spacing error on nested AND
Previously, `AND` expressions were the only filters which used `++s` instead
of `s = StripLeft(s + 1)` making them sensitive to spacing issues. This caused
nested AND expressions (like e.g. `(((A) AND (B)) AND (C))`) to needlessly be
rejected with the following error message: `{find} Word expected` due to the
fact that the inner AND expression would leave the cursor `s` at a space rather
than the beginning of the next word (remainder was ` AND (C))` rather than
`AND (C)`).

This commit fixes this by consistently using `s = StripLeft(s + 1)` instead
of `++s` when parsing AND expressions. Although it is not strictly necessary
to resolve the AND nesting bug, the case of trivial AND expressions (consisting
basically of only superfluous parentheses) is also changed to the new handling.
This should be more robust although I expect that case to be even less common
than the direct nesting of AND expressions.

see MusicPlayerDaemon/MPD#2100
2024-08-23 21:36:53 +02:00
..
AddedSinceSongFilter.cxx song/*SongFilter: use libfmt 2023-11-25 20:42:50 +01:00
AddedSinceSongFilter.hxx Add "added-since" filter expression 2023-11-04 17:25:24 +01:00
AndSongFilter.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
AndSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
AudioFormatSongFilter.cxx song/*SongFilter: use libfmt 2023-11-25 20:42:50 +01:00
AudioFormatSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
BaseSongFilter.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
BaseSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
DetachedSong.cxx Add "added" timestamp to song database 2023-10-20 17:29:31 +02:00
DetachedSong.hxx Add "added" timestamp to song database 2023-10-20 17:29:31 +02:00
Escape.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
Escape.hxx use [[gnu::...]] attributes 2023-03-06 16:14:15 +01:00
Filter.cxx song/Filter: Fix spacing error on nested AND 2024-08-23 21:36:53 +02:00
Filter.hxx Add "added" timestamp to song database 2023-10-20 17:29:31 +02:00
ISongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
LightSong.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
LightSong.hxx Add "added" timestamp to song database 2023-10-20 17:29:31 +02:00
ModifiedSinceSongFilter.cxx song/*SongFilter: use libfmt 2023-11-25 20:42:50 +01:00
ModifiedSinceSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
NotSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
OptimizeFilter.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
OptimizeFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
PrioritySongFilter.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
PrioritySongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
StringFilter.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
StringFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
TagSongFilter.cxx tag/Names: convert to C++ 2023-03-06 15:16:33 +01:00
TagSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
UriSongFilter.cxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
UriSongFilter.hxx use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
meson.build Add "added-since" filter expression 2023-11-04 17:25:24 +01:00