From 47efc7ee2826a523bdf6fc423183412d7ac64a7d Mon Sep 17 00:00:00 2001 From: ZeldaZach Date: Fri, 31 Jan 2025 23:11:55 -0500 Subject: [PATCH] Fix Crash with "c:" in deck editor --- 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 b51cae2f5..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].empty() && 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");