From 349c18aa6ae68eb008303049aca43db5a95859f2 Mon Sep 17 00:00:00 2001 From: Zach H Date: Fri, 31 Jan 2025 23:32:01 -0500 Subject: [PATCH] Fix Crash with "c:" in deck editor (#5537) --- cockatrice/src/game/filters/filter_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/game/filters/filter_string.cpp b/cockatrice/src/game/filters/filter_string.cpp index d1defdefa..039dcdb9f 100644 --- a/cockatrice/src/game/filters/filter_string.cpp +++ b/cockatrice/src/game/filters/filter_string.cpp @@ -281,7 +281,7 @@ static void setupParserRules() for (const auto &i : sv) { parts += std::any_cast(i); } - const bool identity = sv.tokens[0][0] != 'i'; + const bool identity = sv.tokens[0].empty() || sv.tokens[0][0] != 'i'; if (sv.tokens[1][0] == ':') { return [=](const CardData &x) { QString match = identity ? x->getColors() : x->getProperty("coloridentity");