Fix multiple difficulty search queries not working in some cases.

This commit is contained in:
Pasi4K5 2023-09-25 13:38:47 +02:00
parent ab57cbf6f5
commit 74896fd6b2

View File

@ -25,8 +25,12 @@ namespace osu.Game.Screens.Select
internal static void ApplyQueries(FilterCriteria criteria, string query)
{
foreach (Match match in difficulty_query_syntax_regex.Matches(query))
while (true)
{
var match = difficulty_query_syntax_regex.Matches(query).FirstOrDefault();
if (match is null) break;
// Trim the first character because it's always '[' (ignoring spaces)
string cleanDifficultyQuery = match.Value.Trim(' ')[1..];